Single item recovery

Posted: April 29, 2013 in Exchange 2010, MBX, Powershell
Tags: , , , ,

I am often approached by clients on Exchange’s singel item recovery feature. Without tools you can only configure the single item recovery feature PowerShell. This article will provide an overview of the necessary steps.

Activation in Exchange 2010
Activate single-item-recovery for all users

get-mailbox -RecipientType ‘UserMailbox’ | Set-Mailbox -SingleItemRecoveryEnabled $true

Set the deleted-item retention for all databases to 30 days

Get-MailboxDatabase | Set-MailboxDatabase -DeletedItemRetention 30

Fetch deleted-item retention, database and server

Get-MailboxDatabase | ft name, server, deleteditemretention

Get an overview about mailbox, logon, size, deleted items filtered by city Hamburg

get-recipient  -RecipientType ‘UserMailbox’ -Filter ‘((City -like ”Hamburg”))’ | Get-MailboxStatistics | ft DisplayName,LastLogonTime,LastLogoffTime,TotalItemSize,DeletedItemCount

Recovery
Recover deleted items from user mailboxes

Mailbox export request

New-MailboxExportRequest -Mailbox “Discovery Search Mailbox” -SourceRootFolder “Folder of deleted Mail” -ContentFilter {Subject -eq “Subject of deleted Mail”} -FilePath \\FileServerName\C$\ExchangeRecovery\RecoveredMails.pst

If you got an error message that the command Search-Mailbox does not exist, simply close and reopen the Exchange Management shell

Import the messages to the user’s mailbox, use the following command:

New-MailboxImportRequest -Mailbox “Username” -TargetRootFolder “Recovered by Admin” -FilePath \\FileServerName\C$\ExchangeRecovery\RecoveredMails.pst

In the Exchange Management Shell, enter the following command:

Search-Mailbox “Discovery Search Mailbox” -SearchQuery “from:’Username’ AND Subject of deleted Mail” -TargetMailbox “Username” -TargetFolder “Recovered by Admin” -LogLevel Full -DeleteContent

Switch back to the client workstation and check if the message has disappeared from the Discovery Search Mailbox.

Open Outlook and review the new folders from the recovery processes.

Cheers,

Chris

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s