Wednesday, February 24, 2010

How to recover the deleted mailboxes using Exchange Management Shell

Consider, if you’re deleting a mailbox from a user account, the mailbox will be retained as a disconnected mailbox in accordance with the retention settings of the mailbox. Therefore, if you want to reconnect the mailbox to the original user account or another user account, you can do it. Moreover, you can use the Connect-Mailbox cmdlet, as shown in this article in order to recover the mailbox by connecting it to a user account.

Connect-Mailbox -Identity OrigMailboxIdentity
-Database DatabaseIdentity -User NewUserIdentity
[-ActiveSyncMailboxPolicy PolicyId] [-Alias Alias]
[-DomainController DCName] [-ManagedFolderMailboxPolicy PolicyId]
[-ManagedFolderMailboxPolicyAllowed ]
[-Archive ] [-Equipment ]
[-Room ] [-Shared ]
[-ValidateOnly ]

[-LinkedCredential Credential] [-LinkedDomainController DCName]
[-LinkedMasterAccount UserId]

Connect-Mailbox -Identity "Per Reitzel"
-Database "Accounting Mail" -User "CPANDL\perr" -Alias "perr"

Connect-Mailbox -Identity "Per Reitzel"
-Database "Accounting Mail" -LinkedDomainController CorpServer72
-LinkedMasterAccount "CPANDL\perr"