Enables the global catalog service on a domain controller.
strComputer = "atl-dc-01"Const NTDSDSA_OPT_IS_GC = 1Set objRootDSE = GetObject("LDAP://" & strComputer & "/RootDSE")strDsServiceDN = objRootDSE.Get("dsServiceName")Set objDsRoot = GetObject("LDAP://" & strComputer & "/" & strDsServiceDN)intOptions = objDsRoot.Get("options")If (intOptions And NTDSDSA_OPT_IS_GC) = FALSE ThenobjDsRoot.Put "options" , intOptions Or NTDSDSA_OPT_IS_GCobjDsRoot.SetinfoEnd If
This is a VB Script, this can be used by saving the file in .vbs file