获取与 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

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

还没有评论

This site uses Akismet to reduce spam. Learn how your comment data is processed.