The Bootcfg Utility
In the sixth release of the Windows server OS, we finally have a way to programmatically manage the file that controls boot.ini, the system's boot menu. The Bootcfg utility lets you configure, change, or simply query the boot.ini file from the command line. The simplest way to use Bootcfg is to query the boot.ini configuration. At the C:\winnt\system32> command prompt, type
bootcfg /query
Windows will display the system's boot.ini file, which will resemble the one that Figure 6 shows.
You could also use Bootcfg in a batch file that reconfigures a DC's startup sequence to boot automatically into Directory Service Repair (DSREPAIR) mode. Listing 1 shows such a batch file. If the first OS entry in your boot.ini file were
multi(0)disk(0)rdisk(0)
partition(1)\WINNT="Windows
Server 2003" /fastdetect
the batch file would first copy the entry to use as the basis for a new entry. The batch file would then add the correct OS load options to enable DSREPAIR for the new entry and give the new entry an ID of 2. Then the batch file would set the new entry as the default. This simple script could remotely put DCs into DSREPAIR mode to run tasks such as offline defragmentation of the AD database.
Windows 2003's command-line utilities are a solid improvement over Win2K's utilities. You can quickly develop powerful scripts around them without VBScript experience or create a short batch file to run common queries. The utilities are yet another reason to upgrade from Win2K.
For instance: adding an ou as in your first example of the DSADD utility, dsadd failed, A referrel was returned from the server.
What does this mean? I certainly don't know.
Brian April 11, 2004