Title: Message
I guess I should have elaborated. NTDSUtil references domains, sites, and servers by sequential numbers. In order to write a simple command file for DC cleanup, I'd have to know what these numbers would be beforehand, and I'm not at all sure they won't change.
 
What I'd like to do is write a perl script that will figure out what these numbers will be and write a script that I can feed into ntdsutil to do the dirty work.
 
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Brian Desmond
Sent: Friday, March 18, 2005 9:40 AM
To: ActiveDir@mail.activedir.org
Subject: RE: [ActiveDir] Scripting DC cleanup?

You can make ntdsutil work in a script. Just make a batch file. The syntax is to put a sapce between each command and put them in quotes:
 
ntdsutil "connect to domain 1" "do something cool" "build an arc"
ntdsutil "connect to domain 2" "do something cool" "build an arc"
 
etc etc
 
--Brian Desmond
[EMAIL PROTECTED]
Payton on the web! www.wpcp.org
 
v - 773.534.0034 x135
f - 773.534.8101
c - 312.731.3132


From: [EMAIL PROTECTED] on behalf of Ken Cornetet
Sent: Fri 3/18/2005 7:33 AM
To: ActiveDir@mail.activedir.org
Subject: [ActiveDir] Scripting DC cleanup?

It's getting close to time for our annual off-site disaster recovery test, and I'd like to automate a dreaded chore that this testing entails. Our main domain has about two dozen DCs. We only recover one of those during the test. This means I have to perform the ntdsutil dance outlined in KB216498 23 times to remove the phantom DCs.
 
Is there any way I can script this, or at least script creation of a text file that would be piped into ntdsutil?
 
I stumbled across a script called "metacleaner.vbs" written by a gentleman at microsoft, but it did not appear to work.

Reply via email to