- ·上一篇文章:VBS设置IE代理和取消
- ·下一篇文章:用VBS写网吧游戏公告
- ·百度中搜索更多的关于“验证计算机是否为全局编录服务器”相关内容
- ·谷歌中搜索更多的关于“验证计算机是否为全局编录服务器”相关内容
- ******申明******
- 本站文章内容有部分为收录网络中其他网友内容,DOS资源站不保证所有的代码都适合你使用。
- 由于编辑匆忙,有可能造成某些脚本文件出现丢失代码或代码无法运行的情况,请网友根据情况自行修改。
- 如果能将出错部分反馈给我,那就更好了。
验证计算机是否为全局编录服务器
strComputer = "atl-dc-01"
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 & " is a global catalog server."
Else
Wscript.Echo strComputer & " is not a global catalog server."
End If

