Exchange 2010: Recoverable Items and Single Item Recovery

With SingleItemRecovery, be careful turning it on. Make sure you set appropriate quotas and retention polices or you will chew through disk space like none tomorrow! The default on the DB level is 20GB & 30GB and unlimited at the user level.

ToDo: Full details on how this tricky little number works along with SingleItemRecovery. For now, just some reference PS cmdlets:

List all non-mapi (hidden) “Recoverable Items” folders for a given user:
[PS] C:\>Get-MailboxFolderStatistics {alias} -FolderScope RecoverableItems | ft Identity,FolderSize,ItemsInFolderAndSubFolders -AutoSize

Output:

List all mailboxes by {alias}\{folder} size and output to CSV:

Replace “Deletions” with any of the folder names from the first cmdlet.

Apply changes (almost) instantly:

If you repeat the first cmdlet, you can often see the folders reducing in size before your very eyes, right down to the limits set by RecoverableItemsWarningQuota, closest to the next item in the folder.

 

To show the current quotas that affect these folders on a database level:

To show the current quotas that affect these folders on a user level:
[PS] C:\>Get-Mailbox {alias} | ft Name,RecoverableItems* -AutoSize

To determine if its the user or database quota being applied:

True = Using database, whereas False = using mailbox.

 

To find any user that is (or isn’t) using the mailbox defaults:

Name,UseDatabaseQuotaDefaults -AutoSize

 

To turn on mailbox Quotas:

This sets the quotas to 10MB and 15MB.

And for all databases:

To change mailbox quota sizes at the mailbox level (default is unlimited):

And for all users:

And for all users with an CustomAttribute3 of “User” (Can use many filters like OU, department etc.):

P.S.

  • ne = not equal operator. You could also invert the boolean: $true replaced with $false.
  • The question mark “?” = Where = Where-Object
  • {alias} is the mailbox alias. Most commands will also work with AD DisplayName, however as there are often spaces in the DisplayName, it means surrounding it in quotes (” “), so I opt for the alias that can’t (shouldn’t) have spaces.

Please feel free to leave a comment...