DOWNLOAD THE CODE:
Download the Code 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.

End of Article

Prev. page     1 2 3 [4]     next page -->



You must log on before posting a comment.

If you don't have a username & password, please register now.

Reader Comments

I liked the article and the utilities and tried some of the examples. But nowhere can I find any reference to error messages I might receive, especially with DSADD.

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

Hallo, I'd like to help Brain. This error appers when ds-commands syntax is incorrect. In this case 1) check DN of your query or 2) try to add quotes to DN. Hope this helps.

Eugene Sarazhinsky

I'd like to add users with the DN to be LastName, First. I can't seem to get this work? Also, any way to automatically create the e-mail account at the same time?

MikeWachholz

Article Rating 3 out of 5

it's the best page really a boon for me in this hard time thanks to writer

Anonymous User

Try Changing CN=users In The DSADD Command To OU=users. That Should Fix The Problem With The Command Returning An Error, Change "users" To Whatever OU You Want To Place The Newly Created User In.

-Schauste

Anonymous User

Lets say I have an OU called Admin. Within that OU I created 2 more OU's called users and computers. How would I map to a user in the OU=Admin the user is inside the OU=sales.

Ican get everything to work through just having an Admin OU, but for administration purposes I have added a further 2 OU's within an OU.

How would i use say the dsadd command to put a user in an OU within an OU????

Anonymous User

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.

wglabais

Article Rating 3 out of 5

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 "<pcname>,OU=Sales,OU=Admin,cn=<DomainName>,cn=<DomainSuffix>"

Hope this helps. Steve B

Anonymous User

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

Pete

Anonymous User

Article Rating 4 out of 5

i would like to know when two user use of NAT

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

Anonymous User

Article Rating 3 out of 5

good sit

hamedjafari

Article Rating 3 out of 5