Applies to: Exchange Server 2007
Topic Last Modified: 2007-06-05

Use the Disable-MailUser cmdlet to mail-disable an existing user in the Active Directory directory service by removing the attributes used by Microsoft Exchange Server 2007.

Syntax

Disable-MailUser -Identity <MailUserIdParameter> [-DomainController <Fqdn>]

Parameters

Parameter Required Type Description

Identity

Required

Microsoft.Exchange.Configuration.Tasks.MailUserIdParameter

This parameter takes one of the following values:

  • ADObjectID

  • GUID

  • distinguished name

  • Domain\SamAccountName

  • user principal name (UPN)

  • LegacyExchangeDN

  • E-mail Address

  • User alias

DomainController

Optional

Microsoft.Exchange.Data.Fqdn

To specify the fully qualified domain name (FQDN) of the domain controller that writes this configuration change to Active Directory, include the DomainController parameter on the command.

Detailed Description

This cmdlet mail-disables an existing user by removing the Active Directory Exchange Server attributes of the user. The user is not deleted from Active Directory.

To run the Disable-MailUser cmdlet, the account you use must be delegated the following:

  • Exchange Recipient Administrator role

For more information about permissions, delegating roles, and the rights that are required to administer Exchange Server 2007, see Permission Considerations.

Input Types

Return Types

Errors

Error Description

 

Exceptions

Exceptions Description

 

Example

In this example, the Disable-MailUser command is used to mail-disable an existing user.

Copy Code
Disable-MailUser ted@contoso.com