Printout Header
RSS Feed

Check: Is this domain controller a global catalog?


If you want to know whether a domain controller with a given name is a global catalog or not, you can verify this with the following script:

dcName = "NAME_OF_THE_SERVER_TO_CHECK" 'insert the name of your own server here Const NTDSDSA_OPT_IS_GC = 1 Set rootDSE = GetObject("LDAP://" & dcName & "/rootDSE") dcDN = objRootDSE.Get("dsServiceName") set dcObj = GetObject("LDAP://" & dcName & "/" & dcDN) options = dcObj.Get("options") If options And NTDSDSA_OPT_IS_GC Then WScript.Echo dcName & " is a global catalog" Else Wscript.Echo dcName & " is not a global catalog" End If