17.10. Mail-Disabling a User
You want to mail-disable a user.
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 (see Recipe 17.6).
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 a command-line interface
> exchmbx -b "
<User DN> with the
user's distinguished name.
For an alternative Microsoft native tool method, create an LDIF file called clearmailattribs.ldf with the following contents:
<UserDN>changetype: modify replace: altRecipient altRecipient: - replace: authOrig authOrig: - ...
<SEE DISCUSSION, NOT A COMPLETE LDIF FILE>...
<UserDN> with the
user's distinguished name. Note that this is not a complete LDIF
file as there are many attributes that must be cleared (see the
Discussion section). Once you've created the LDIF file, run the
> ldifde -i -f clearmailattribs.ldf
' This code mail disables a user. ' ------ SCRIPT CONFIGURATION ------ strUserDN = "
<UserDN>" ' e.g., cn=jsmith,cn=Users,dc=rallencorp,dc=com ' ------ ...