Remove-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 Remove-MailUser cmdlet to remove an existing mail-enabled user from the Active Directory directory service.

Syntax

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

Detailed Description

The Remove-MailUser cmdlet removes an existing mail-enabled user object from the Active Directory directory service.

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

  • Exchange Recipient Administrator role

  • Account Operator role for the applicable Active Directory containers

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

Parameters

Parameter Required Type Description

Identity

Required

Microsoft.Exchange.Configuration.Tasks.MailUserIdParameter

This parameter specifies the identity of the mail user.

DomainController

Optional

Microsoft.Exchange.Data.Fqdn

To specify the fully qualified domain name 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 Remove-MailUser command is used to remove the mail-enabled user Ted Bremer from Active Directory.

Remove-MailUser -Identity "Ted Bremer"