Export (0) Print
Expand All

Undo-SoftDeletedMailbox

Exchange Online
 

Applies to: Exchange Online

Topic Last Modified: 2014-07-08

This cmdlet is available only in the cloud-based service.

Use the Undo-SoftDeletedMailbox cmdlet to recover a mailbox that has been deleted. Mailboxes can be recovered within 30 days of being deleted.

For information about the parameter sets in the Syntax section below, see Syntax.

Undo-SoftDeletedMailbox -SoftDeletedObject <MailboxIdParameter> [-Name <String>] [-Password <SecureString>] [-WindowsLiveID <WindowsLiveId>] <COMMON PARAMETERS>
Undo-SoftDeletedMailbox -EnableRoomMailboxAccount <$true | $false> [-RoomMailboxPassword <SecureString>] <COMMON PARAMETERS>
Undo-SoftDeletedMailbox -LinkedRoom <SwitchParameter> <COMMON PARAMETERS>
Undo-SoftDeletedMailbox [-AuxMailbox <SwitchParameter>] <COMMON PARAMETERS>
Undo-SoftDeletedMailbox [-IsExcludedFromServingHierarchy <$true | $false>] <COMMON PARAMETERS>
COMMON PARAMETERS: [-Confirm [<SwitchParameter>]] [-DisplayName <String>] [-DomainController <Fqdn>] [-Languages <MultiValuedProperty>] [-MailboxProvisioningConstraint <MailboxProvisioningConstraint>] [-MailboxProvisioningPreferences <MultiValuedProperty>] [-Organization <OrganizationIdParameter>] [-WhatIf [<SwitchParameter>]]

This example recovers the deleted mailbox for the user Florence Flipo. When this mailbox was deleted, the associated Windows Live ID was also deleted.

Undo-SoftDeletedMailbox -SoftDeletedObject florencef

This example recovers the deleted mailbox for the user Brian Johnson. When this mailbox was deleted, the associated Microsoft account (formerly known as a Windows Live ID) wasn't deleted. Note that a new Microsoft account and password have to be created to recover this mailbox. In the scenario, the old Microsoft account is retained as a proxy address for the mailbox.

Undo-SoftDeletedMailbox bjohnson@contoso.edu -WindowsLiveID brianj@contoso.edu -Password (ConvertTo-SecureString -String 'Pa$$word1' -AsPlainText -Force) 

Use the Undo-SoftDeletedMailbox cmdlet to recover a mailbox that has been deleted. When a mailbox is deleted with the Remove-Mailbox cmdlet, it's not actually deleted. It's hidden in Exchange and moved in Active Directory to the organizational unit (OU) Soft Deleted Objects. This enables administrators to recover deleted mailboxes for up to 30 days after deletion.

If the Microsoft account (formerly known as a Windows Live ID) wasn't deleted when the mailbox was deleted, you have to specify a new Microsoft account and password when you use the Undo-SoftDeletedMailbox cmdlet to recover a mailbox.

You need to be assigned permissions before you can run this cmdlet. Although all parameters for this cmdlet are listed in this topic, you may not have access to some parameters if they're not included in the permissions assigned to you. To see what permissions you need, see the "Recipient provisioning permissions" section in the Recipients Permissions topic.

 

Parameter Required Type Description

EnableRoomMailboxAccount

Required

System.Boolean

This parameter is reserved for internal Microsoft use.

LinkedRoom

Required

System.Management.Automation.SwitchParameter

This parameter is reserved for internal Microsoft use.

SoftDeletedObject

Required

Microsoft.Exchange.Configuration.Tasks.MailboxIdParameter

The SoftDeletedObject parameter specifies the identity of the deleted mailbox to recover. You can use the alias or the email address of the deleted mailbox for the value of this parameter. Use the Get-Mailbox –SoftDeletedMailbox command to get information for deleted mailboxes.

AuxMailbox

Optional

System.Management.Automation.SwitchParameter

This parameter is reserved for internal Microsoft use.

Confirm

Optional

System.Management.Automation.SwitchParameter

The Confirm switch causes the command to pause processing and requires you to acknowledge what the command will do before processing continues. You don't have to specify a value with the Confirm switch.

DisplayName

Optional

System.String

The DisplayName parameter specifies the new display name for the recovered mailbox.

DomainController

Optional

Microsoft.Exchange.Data.Fqdn

This parameter is reserved for internal Microsoft use.

IsExcludedFromServingHierarchy

Optional

System.Boolean

Use the IsExcludedFromServingHierarchy parameter when recovering a public folder mailbox. This parameter prevents users from accessing the public folder hierarchy on the specified public folder mailbox. For load-balancing purposes, users are equally distributed across public folder mailboxes by default. When this parameter is set on a public folder mailbox, that mailbox isn't included in this automatic load-balancing and won't be accessed by users to retrieve the public folder hierarchy. However, if an administrator has set the DefaultPublicFolderMailbox property on a user mailbox to a specific public folder mailbox, the user will still access the specified public folder mailbox even if the IsExcludedFromServingHierarchy parameter is set for that public folder mailbox.

Languages

Optional

Microsoft.Exchange.Data.MultiValuedProperty

This parameter is reserved for internal Microsoft use.

MailboxProvisioningConstraint

Optional

Microsoft.Exchange.Data.Directory.MailboxProvisioningConstraint

This parameter is reserved for internal Microsoft use.

MailboxProvisioningPreferences

Optional

Microsoft.Exchange.Data.MultiValuedProperty

This parameter is reserved for internal Microsoft use.

Name

Optional

System.String

The Name parameter specifies a new value for the Name property of the recovered mailbox. Otherwise, the original value is retained when the mailbox is recovered. The new name value is also used in the DistinguishedName property.

Organization

Optional

Microsoft.Exchange.Configuration.Tasks.OrganizationIdParameter

This parameter is reserved for internal Microsoft use.

Password

Optional

System.Security.SecureString

The Password parameter specifies a new password for the mailbox. Use the following format: -Password (ConvertTo-SecureString -String 'password' -AsPlainText -Force)

ImportantImportant:
You have to include the Password parameter to recover a deleted mailbox with an existing Microsoft account (formerly known as a Windows Live ID) that wasn't deleted with the mailbox.

RoomMailboxPassword

Optional

System.Security.SecureString

This parameter is reserved for internal Microsoft use.

WhatIf

Optional

System.Management.Automation.SwitchParameter

The WhatIf switch instructs the command to simulate the actions that it would take on the object. By using the WhatIf switch, you can view what changes would occur without having to apply any of those changes. You don't have to specify a value with the WhatIf switch.

WindowsLiveID

Optional

Microsoft.Exchange.Data.WindowsLiveId

The WindowsLiveID parameter specifies a new Microsoft account (formerly known as a Windows Live ID) and primary SMTP for the mailbox. The previous Microsoft account is retained as a proxy address for the mailbox.

ImportantImportant:
You have to include the WindowsLiveID parameter to recover a deleted mailbox with an existing Microsoft account (formerly known as a Windows Live ID) that wasn't deleted with the mailbox.

To see the input types that this cmdlet accepts, see Cmdlet Input and Output Types. If the Input Type field for a cmdlet is blank, the cmdlet doesn’t accept input data.

To see the return types, which are also known as output types, that this cmdlet accepts, see Cmdlet Input and Output Types. If the Output Type field is blank, the cmdlet doesn’t return data.

 
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft