Q. How can I use the support tools to list the global catalog servers in my domain?

Jerold Schulman

July 23, 2006

1 Min Read
ITPro Today logo in a gray background | ITPro Today

If you have NOT already installed the Windows Server Support Tools on you workstation, install them from the SUPPORTTOOLSSUPTOOLS.MSI file of the Windows Server CD-ROM.

Using NETDOM.EXE and Repadmin.exe from the Support Tools, I have scripted ListGC.bat to list the global catalog servers in the domain you are logged onto.

The syntax for using ListGC.bat is:

ListGC

ListGC.bat contains:

@echo offsetlocalset get=netdom QUERY /DOMAIN:%USERDNSDOMAIN% DCset no=The command completed successfully.for /f "Skip=1 Tokens=*" %%a in ('%get%^|find /V "%no%"') do (  call :isgc %%a)endlocalgoto :EOF:isgcset GC=Nfor /f "Tokens=*" %%g in ('repadmin /showreps %1 ^|findstr /l /i /C:"DC Options: IS_GC"') do ( set GC=Y)if "%GC%" EQU "Y" @echo %1 


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.

You May Also Like