January 2006
Beginner
832 pages
27h 52m
English
Mail-disabling a contact is exactly like mail-disabling a user:
' This code mail disables a contact.
Option Explicit
Dim strContactDN, objContact
' ------ SCRIPT CONFIGURATION ------
strContactDN = "<ContactDN>" ' e.g. cn=DrAmy,ou=Contacts,dc=mycorp,dc=com
' ------ END CONFIGURATION ---------
set objContact = GetObject("LDAP://" & strContactDN)
objContact.MailDisable
objContact.SetInfo( )
WScript.Echo "Successfully mail-disabled contact."Mail-disabling a contact requires Exchange Data Administrator permissions.
Previously it was mentioned that you needed to know if the user was mail-enabled or mailbox-enabled. This is not the case with contacts
because they cannot be mailbox-enabled; you can always use the MailDisable method for Exchange contacts.