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

相关文章:

  • 2021-08-05
  • 2021-12-04
  • 2021-10-10
  • 2021-06-06
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-07-31
  • 2021-12-21
  • 2021-06-01
  • 2021-12-10
  • 2022-12-23
  • 2021-11-12
  • 2021-11-09
相关资源
相似解决方案