strComputer = "server" Const NTDSDSA_OPT_IS_GC = 1 Set 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 Then WScript.Echo strComputer & " 是全局编录服务器." Else Wscript.Echo strComputer & " 不是全局编录服务器." End If
欢迎加入QQ技术群聊:70539804