⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sol16-18b.vbs

📁 Apress - Managing Enterprise Systems With The Windows Script Host Source Code
💻 VBS
字号:
Dim objAddressContainer, objNewAddressContainer

'get a reference to the container the recipient list will reside in...
Set objAddressContainer = _
GetObject("LDAP://CN=All Address Lists," & _ 
                 "CN=Address Lists Container,CN=C3I,CN=Microsoft Exchange," & _
                  "CN=Services,CN=Configuration,DC=c3i,DC=com")

'create an object of addressBookContainer class, specifying the name
'using in RDN format
Set objNewAddressContainer = _
      objAddressContainer.Create("addressBookContainer", "CN=Company X")

'set display name
objNewAddressContainer.DisplayName = " Company X List"
objNewAddressContainer.instanceType = 4

'set the LDAP search criteria for the address list. The following criteria
' lists all contacts that are employees of Company XYZ 
objNewAddressContainer.purportedSearch = "(&(&(&(& (mailnickname=*)(|" & _ 
                       "(&(objectCategory=person)(objectClass=contact)))))" & _
                       "(objectCategory=user)(company=Company X)))"
objNewAddressContainer.SetInfo

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -