Commands › Exchange Online
Get-RecoverableItems
Use the Get-RecoverableItems items cmdlet to view deleted items in mailboxes. After you find the deleted items, you use the Restore-RecoverableItems cmdlet to restore them. 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
# Get-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
Get-RecoverableItems | Format-List
# 3. Export for evidence / drift tracking
Get-RecoverableItems | Export-Clixml .\RecoverableItems-$(Get-Date -Format yyyyMMdd).xml
Syntax — 2 parameter sets
OnPremises
Get-RecoverableItems -Identity <GeneralMailboxOrMailUserIdParameter>
[-EntryID <String>]
[-FilterEndTime <DateTime>]
[-FilterItemType <String>]
[-FilterStartTime <DateTime>]
[-LastParentFolderID <String>]
[-ResultSize <Unlimited>]
[-SourceFolder <RecoverableItemsFolderType>]
[-SubjectContains <String>]
[<CommonParameters>]
Cloud
Get-RecoverableItems -Identity <GeneralMailboxOrMailUserIdParameter[]>
[-EntryID <String>]
[-FilterEndTime <DateTime>]
[-FilterItemType <String>]
[-FilterStartTime <DateTime>]
[-LastParentFolderID <String>]
[-MaxParallelSize <Int32>]
[-PolicyTag <String[]>]
[-ResultSize <Unlimited>]
[-SkipCount <Int32>]
[-SourceFolder <RecoverableItemsFolderType>]
[-SubjectContains <String>]
[<CommonParameters>]
Parameters (12)
Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.