Skip to content

Disconnect-ADUserFromMailbox

SYNOPSIS

Disconnects an Active Directory user from their mailbox.

SYNTAX

Disconnect-ADUserFromMailbox [-Identity] <String> [<CommonParameters>]

DESCRIPTION

The `Disconnect-ADUserFromMailbox` function removes the mailbox association for the specified Active Directory user. It handles both on-premises and remote mailboxes, ensuring proper cleanup and replication of changes in Active Directory.

EXAMPLES

EXAMPLE 1

Disconnect-ADUserFromMailbox -Identity "jdoe"

Disconnects the mailbox associated with the user "jdoe."

EXAMPLE 2

Disconnect-ADUserFromMailbox -Identity "CN=John Doe,OU=Users,DC=example,DC=com"

Disconnects the mailbox associated with the user "John Doe" in the specified organizational unit.

PARAMETERS

-Identity

The identity of the Active Directory user to disconnect (e.g., DistinguishedName, UserPrincipalName, or SamAccountName).

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

OUTPUTS

NOTES