启用自动更新电子邮件地址收件人策略方案为一个 OU 中的所有用户或所有 Active Directory 的基础。这是通过清除来自用户属性的 msExchPoliciesExcluded 属性。
Visual Basic
Const ADS_PROPERTY_CLEAR = 1
Set objConnection = CreateObject(“ADODB.Connection”)
objConnection.Open “Provider=ADsDSOObject;”
Set objCommand = CreateObject(“ADODB.Command”)
objCommand.ActiveConnection = objConnection
objCommand.CommandText = “;(objectCategory=User)” & “;distinguishedName;subtree”
Set objRecordSet = objCommand.Execute
intCounter = 0
While Not objRecordset.EOF
usuario = objRecordset.Fields(“distinguishedName”)
Set objUser = GetObject (“LDAP://” & usuario & “”)
objUser.PutEx ADS_PROPERTY_CLEAR, “msExchPoliciesExcluded” , 0
objUser.SetInfo
objRecordset.MoveNext
Wend
objConnection.Close
Exchange中文站
Exchange中文站是一个专注讨论 Microsoft Exchange Server / Exchange Online / Office 365 的技术型网站。
Exchange中文站 的最新文章 (查看所有)
- Exchange Server 2019 安装部署 - 2018年10月8日
- Exchange 2019 新功能介绍 - 2018年8月26日
- Office 365和Exchange 2019将支持EAI地址 - 2018年8月11日
发布于:
浏览:1609 次
还没有评论