Commands › Exchange Online
Restore-RecoverableItems
Use the Restore-RecoverableItems items cmdlet to restore deleted items in mailboxes. You use the Get-RecoverableItems cmdlet to find the deleted items to recover. To use this cmdlet, you need to add the Mailbox Import Export role to a role group (for example, to the Organization Management role group). For more information, see Add a role to a role group.
Quick start script
# Restore-RecoverableItems — quick start (serv365.ai)
# 1. Connect (app-only shown; interactive: omit the certificate parameters)
Connect-ExchangeOnline -CertificateThumbprint $thumb -AppId $appId -Organization $org
# 2. Run and inspect
Restore-RecoverableItems | Format-List
# 3. Export for evidence / drift tracking
Restore-RecoverableItems | Export-Clixml .\RecoverableItems-$(Get-Date -Format yyyyMMdd).xml
Syntax — 2 parameter sets
OnPremises
Restore-RecoverableItems -Identity <GeneralMailboxOrMailUserIdParameter>
[-EntryID <String>]
[-FilterEndTime <DateTime>]
[-FilterItemType <String>]
[-FilterStartTime <DateTime>]
[-LastParentFolderID <String>]
[-ResultSize <Unlimited>]
[-SourceFolder <RecoverableItemsFolderType>]
[-SubjectContains <String>]
[<CommonParameters>]
Cloud
Restore-RecoverableItems -Identity <GeneralMailboxOrMailUserIdParameter[]>
[-EntryID <String>]
[-FilterEndTime <DateTime>]
[-FilterItemType <String>]
[-FilterStartTime <DateTime>]
[-LastParentFolderID <String>]
[-MaxParallelSize <Int32>]
[-NoOutput]
[-PolicyTag <String[]>]
[-RestoreTargetFolder <String>]
[-ResultSize <Unlimited>]
[-SourceFolder <RecoverableItemsFolderType>]
[-SubjectContains <String>]
[<CommonParameters>]
Parameters (13)
Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.