获取与 ADSI 的 Exchange 组织名称

报告从 Microsoft Exchange 服务器的 Exchange 组织的名称。
Visual Basic
On Error Resume Next
Set ObjRoot = GetObject(“LDAP://RootDSE”)
strConfigNC = ObjRoot.Get(“configurationNamingContext”)
Set colExchangeContainer = GetObject _
(“LDAP://CN=Microsoft Exchange,CN=Services,” & strConfigNC)
If Err = 0 Then
For Each objExchangeOrg In colExchangeContainer
If (objExchangeOrg.Class = “msExchOrganizationContainer”) Then
Wscript.Echo “Exchange Organization name: ” & _
objExchangeOrg.Get(“CN”)
End If
Next
Else
WScript.Echo “Exchange not installed.”
End If

Latest posts by Exchange中文站 (see all)
发布于: 浏览:2897 次

还没有评论

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据