Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.
January 19, 2004
Using the RepAdmin.exe Windows Server 2003 Support Tool, I have scripted ISGC.bat to test if a server is a Global Catalog server.
The syntax for using ISGC.bat is:
call ISGC ServerName GCVar
Where ServerName is the NetBIOS name of the domain controller, and GCVar is a call directed environment variable that will be set to a Y or N.
NOTE: see Another way to test if a domain controller is a Global Catalog server?
ISGC.bat contains:
@echo offif {%2}=={} @echo Syntax: ISGC ServerName GCVar&exit /b 1set %2=Nfor /f "Tokens=* %%g in ('repadmin /showreps %1 ^|findstr /l /i /C:"DC Options: IS_GC"') do ( set %2=Y)exit /b 0
You May Also Like