VBScript: hide mailbox in Exchange 5.5

Same as all scripts working with Exchange 5.5, download and install the AcctCrt COM components from Microsoft. Only issue with this script is that it’s not easy to reverse the operation. Once the mailbox is hidden, it is also hidden from LDAP queries. The only way to get it back is to do a special LDAP login (using clear-text password, so you really don’t want to do that).

strExchangeServer = wscript.arguments(0)
strMailboxLDAP = wscript.arguments(1)
strMailboxLDAP = "LDAP://" & strExchangeServer & "/" & strMailboxLDAP

Set objAcctMgmt = CreateObject("MSExchange.AcctMgmt")
Set objMailbox = GetObject(strMailboxLDAP)

objMailbox.Put "Hide-From-Address-Book",True
objMailbox.SetInfo

Geschreven door:

Arnout van der Vorst

Arnout van der Vorst is Identity Management Architect bij Tools4ever en al ruim 10 jaar in dienst. Arnout legt zich als Architect toe op het bedenken en ontwikkelen van nieuwe features, oplossingen en diensten van Tools4ever die aansluiten op de vraag uit de markt. Arnout studeerde Hogere Informatica aan de Hogeschool van Utrecht.
Terug