Hide users in OU from Exchange GAL

Anything VBScript-related, including Windows Script Host, WMI, ADSI, and more.
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 16 years and 7 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
User avatar
CJS
Posts: 8
Last visit: Tue May 06, 2008 1:28 am

Hide users in OU from Exchange GAL

Post by CJS »

Hello,
here is what I have so far:

Code: Select all

Dim oOU, oUser
Set oOU = GetObject(LDAP://OU=TargetOU, DC=A, DC=.COM)
For Each oUser In oOU
 If oUser.Class = "user" Then
  oUser.msExchHideFromAddressList = True
  oUser.SetInfo
 End If
Next

Noting special, trying to modify all user objects in the target OU setting them to be hidden from the Exchange GAL.

The error I receive is Object doesn't support this property or method: 'msExchangeHideFromAddrssList'

should I use:

Code: Select all

oUser.put "msExchHideFromAddressList", True

CJSCJS2007-09-05 08:42:03
This topic is 16 years and 7 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked