Subscribe to Windows IT Pro
March 25, 2003 12:00 AM

Windows Server 2003 Command-Line Utilities

New utilities make scripting easy
Windows IT Pro
InstantDoc ID #38283
Rating: (5)
Downloads
38283.zip

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.

Related Content:

ARTICLE TOOLS

Comments
  • hamedjafari
    4 years ago
    Jul 25, 2008

    good sit

  • Anonymous User
    7 years ago
    Jun 02, 2005

    i would like to know when two user use of NAT

    how nat underestand the packet that recived,belong to which user?

  • Anonymous User
    7 years ago
    Mar 13, 2005

    Something I was taught on a course recently; "Read it Right to Left"

    Pete

  • Anonymous User
    7 years ago
    Feb 27, 2005

    With the 2 OUs (Nested), the syntax is to list the lowest OU 1st. i.e in the case of Sales inside Admin, type

    DSADD computer ",OU=Sales,OU=Admin,cn=,cn="

    Hope this helps.
    Steve B

  • Wayne
    7 years ago
    Jan 18, 2005

    I thought command line utilities were only for Novell and Unix Administrators, and the big advantage to the Windows GUI was you didn't need command line utilities. How about some real integrated tools that do the job of batching and scripting for use, like ZenWorks.

You must log on before posting a comment.

Are you a new visitor? Register Here

advertisement

advertisement

Windows is a trademark of the Microsoft group of companies. Windows IT Pro is used by Penton Media Inc. under license from owner.