Share via


Disable-MailUser (RTM)

Microsoft Exchange Server 2007 will reach end of support on April 11, 2017. To stay supported, you will need to upgrade. For more information, see Resources to help you upgrade your Office 2007 servers and clients.

 

Applies to: Exchange Server 2007

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>]

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.

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.

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.

Disable-MailUser ted@contoso.com