Using a graphical user interface
- Open the ADUC snap-in.
- This needs to be run on a workstation or server that has the Exchange Management Tools loaded
- If you need to change domains, right-click on Active Directory Users and Computers in the left pane, select Connect to Domain, enter the domain name, and click OK
- In the left pane, browse to the parent container of the user, right-click on the user, and select Exchange Tasks.
- On the Welcome screen, click Next.
- Select Remove Exchange Attributes and click Next.
- Read the warning and click Next.
- On the Completion screen, click Finish.
Using VBScript
' This code mail disables a contact. ' ------ SCRIPT CONFIGURATION ------ strContactDN = "" ' e.g., cn=jsmith,ou=Contacts,dc=rallencorp,dc=com ' ------ END CONFIGURATION --------- set objContact = GetObject("LDAP://" & strContactDN) objContact.MailDisable objContact.SetInfo( ) Wscript.Echo "Successfully mail-disabled contact."
Tags: mail