O-Xchange Notes from the Field!

Friday, November 4, 2011

Single Item Recovery

get-mailbox mailboxname| f1 singleitem*

--To set single item recovery on all users in a specific database run the following command:

Get-Mailbox -Database <DatabaseName> | Set-Mailbox -SingleItemRecoveryEnabled $true

--And for newly created mailboxes (24h):

Get-Mailbox -Database <DatabaseName> | Where { $_.WhenCreated -gt (get-date).adddays(-1) } | Set-Mailbox -SingleItemRecoveryEnabled $true

--Enabling Single Item Recovery

( By Server)
Get-Mailbox -Server servername| Set-Mailbox -SingleItemRecoveryEnabled $true

(By Database)
Get-mailbox -database dbname | Set-Mailbox -SingleItemRecoveryEnabled $true