Rod, Line 6 should all be on one line in your script. But I posted an all VBS version this morning, which is much better I believe. Glenn Sullivan, MCSE+I MCDBA David Clark Company Inc. -----Original Message----- From: Rod Falanga [mailto:rfalanga@xxxxxxx] Sent: Thursday, October 03, 2002 10:07 AM To: windows2000@xxxxxxxxxxxxx Subject: [windows2000] Re: A question or two about rebooting servers t Glenn, Thank you, for the script! I've got a question about line #6. Should it wrap (as you say it would), or should it all go onto one line? And I assume that it is supposed to be a .BAT file, but could it also be a .VBS file? Rod -----Original Message----- Msg: #18 in digest From: "Sullivan, Glenn" <GSullivan@xxxxxxxxxxxxxx> Subject: [windows2000] Re: A question or two about rebooting servers t Date: Wed, 2 Oct 2002 13:19:33 -0400 I just threw together a batch file that automates a domain Synch, and thought y'all might want to take a look. This is short and sweet, and uses two tools from the support tools package: repadmin.exe and search.vbs. It queries your AD for members of the "Domain Controllers" OU and then runs repadmin/syncall for each domain controller. I am numbering the lines, because I know that line six (the important one) is going to wrap. Change lines 3 and 4 to match your domain. As it is written, it will synch all domain controllers in the "DomainName.com" domain. <-------start--------> 1. @echo off 2. setlocal 3. set @DomainName=DomainName 4. set @DomainSuffix=com 5. 6. for /f "tokens=4 skip=1" %%i in ('cscript //nologo "%ProgramFiles%\Support Tools\search.vbs" "LDAP://OU=Domain Controllers,DC=%@DomainName%,DC=%@DomainSuffix%" /p:name /q') do repadmin /syncall %%i dc=%@DomainName%,dc=%@DomainSuffix% /force 7. endlocal <--------end---------> Hope this helps, Glenn Sullivan, MCSE+I MCDBA David Clark Company Inc. ================================== To Unsubscribe, set digest or vacation mode or view archives use the below link. http://thethin.net/win2000list.cfm ================================== To Unsubscribe, set digest or vacation mode or view archives use the below link. http://thethin.net/win2000list.cfm