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

If you have NOT already installed the Windows Server Support Tools on you workstation, install them from the \SUPPORT\TOOLS\SUPTOOLS.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 off
setlocal
set get=netdom QUERY /DOMAIN:%USERDNSDOMAIN% DC
set no=The command completed successfully.
for /f "Skip=1 Tokens=*" %%a in ('%get%^|find /V "%no%"') do (
  call :isgc %%a
)
endlocal
goto :EOF
:isgc
set GC=N
for /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 


Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish