To configure your own custom admin tool, open a blank MMC in Author mode by opening Start/Run and typing mmc.exe. This will open up an untitled console (Console1) and display a generic console root, shown in Figure 3.7. You can now open existing MSC files (just as you open DOC files in Word or XLS files in Excel) by choosing Open from the File menu. These files will automatically open in Author mode if you open them in a blank console. If you wish to open and fiddle with existing MSC files, most (but not all) of them are in the \Windows\system32 directory. Just be sure to leave the original MSC files intact; you might need them again. In the example that follows, you’ll be creating a tool from scratch, starting with a blank console and loading snap-ins.
FIGURE 3.7
A generic console root
Suppose you need a tool for hardware management and troubleshooting. To create it, follow these steps:
1. Start by renaming the console root Hardware Tools; right-click the console root and choose Rename (you can perform this step later if you prefer).
2. Now you’re ready to add snap-ins. Choose Add/Remove Snap-in from the File menu in the Main window. As you can see in Figure 3.8, you must choose where to add the snap-in. Right now, it’s only possible to add snap-ins to the console root (now called Hardware Tools), but you can group related tools by first adding folders to the console root. Folders are imple- mented as snap-ins, permitting you to organize tools into groups on the console tree.
58 CHAPTER 3 CONFIGURING WINDOWS SERVER: THE MICROSOFT MANAGEMENT CONSOLE
FIGURE 3.8
Choosing where to add snap-ins
3. To add folders to the console root, choose the Add button to open the Add Standalone Snap-In dialog box (see Figure 3.9). You’ll now see both dialog boxes, sort of cascaded. Items chosen from the list in the Add Standalone Snap-In dialog box will appear in the list of snap-ins in the parent dialog box. Scroll through the list until you see the Foldersnap-in. Choose Add, and the folder appears in your list of snap-ins in the Add/Remove Snap-In dialog box. Choose Add again and you’ll see two. Now close the Add Standalone Snap-In dialog box to return to Add/Remove Snap-In, and click OK to close it.
4. Back at the console in progress, right-click the folders to rename them. Figure 3.10 shows a Hardware Tools console with three folders, renamed to DiskTools, OtherTools, and WebSites.
5. The WebSites folder will contain snap-ins that are hyperlinks to hardware vendor and support sites. To add links to the WebSites container, open the Add/Remove Snap-In dialog again (choose Add/Remove Snap-In from the File menu), select the WebSites folder as the container, choose Add, then scroll through the list until you find Link to Web Address. Click the Add button, and follow the wizard prompts to create a new Internet shortcut; simply fill in the URL and give the shortcut a friendly name. Choose Close and then OK to close the Add/Remove Snap-In page and return to the console. Now when you select the link in the console tree, the Web page will appear within the details pane. You can surf
BUILDING YOUR OWN MMC TOOLS 59
the Web from within the console, although technically you’ll need links to leave that particular site.
FIGURE 3.9
The Add Standalone Snap-In dialog box
FIGURE 3.10
Customizing the console
To add tools to the other folders, follow the same process and choose the appropriate tools from the list of snap-ins available. Some third-party software vendors are now implementing their tools as snap-ins, so this list will expand and vary with the system configuration and software installed. Some tools will prompt you to select a computer to manage. Others, such as the Event Viewer snap-in, also present the option to choose the machine when you start the tool from the command line, as shown in Figure 3.11. To specify a remote system to manage when you open the tool, enter FILENAME.MSC /computer=computername in the Start/Run box or at a command prompt.
60 CHAPTER 3 CONFIGURING WINDOWS SERVER: THE MICROSOFT MANAGEMENT CONSOLE
FIGURE 3.11
Selecting a computer for the snap-in to manage
While adding the stand-alone snap-ins, be sure to check out the available extensions for them. It’s interesting to note that the Computer Management snap-in components are all implemented as extensions (see Figure 3.12), although most of these also exist as stand-alone snap-ins. When loading the Computer Management snap-in, you have the option to deselect the extensions that aren’t needed for your custom tool. All available extensions are added by default.
FIGURE 3.12
Select or deselect extensions
BUILDING YOUR OWN MMC TOOLS 61
In Figure 3.13, you can see what your final tool could look like: a customized Hardware Tools console. This one consists of a DiskTools folder (with Defragmenter and Disk Management), a folder called OtherTools that includes the Device Manager and the Event Viewer, and a WebSites folder that can be filled with helpful hardware support links.
To save the custom console, choose Save from the File menu, name the file and click Save. Now the MSC file is ready to use.
FIGURE 3.13
A custom Hardware Tools console