Share via


Exchange 2016 PowerShell Quick tip: Restore Recoverable Items with a simple command


Introduction

If you have backups in Exchange, you know that you can go to the backup and recover items, either by creating a recoverable mailbox database or performing item level restore to a mailbox or PST file.

Command to retrieve data

In Exchange 2016, can also be Exchange 2019 or Exchange 2013, you can run a simple command to retrieve data from the dumpster. Depending on the retention period of your dumpster, that is how far back you can go.

Here is the command that you can run:

Get-RecoverableItems UserMailbox | Restore-RecoverableItems

https://everything-powershell.com/wp-content/uploads/2021/01/image.png

Depending on the amount of data to be deleted and how busy the server is, this can take a while.

The above will be limited to the first 10000 items and you will see a big warning, you can change that by modifying the command as per below:

Get-RecoverableItems UserMailbox -ResultSize Unlimited | Restore-RecoverableItems

https://everything-powershell.com/wp-content/uploads/2021/01/image-1.png

Once the command is initiated, it will restore to the original location.