Forum Discussion
TonyRedmond
Sep 18, 2024MVP
Using the Get-RecoverableItems Cmdlet to Report Recoverable Items
Sometimes you don’t need the full-fledged Graph API to report details of items in Recoverable Items and the Get-RecoverableItems cmdlet can do the job. The data fetched by the cmdlet isn’t as rich as the information available through the Graph, but if all you want is a simple listing of what’s in a mailbox’s Deletions folder, Get-RecoverableItems is a good solution. And best of all, we provide a full script to show how.
https://office365itpros.com/2024/09/18/get-recoverableitems/
4 Replies
Sort By
BTW, why not do something like Get-RecoverableItems -Identity Jack.Smith | Sort-Object {$_.LastModifiedTime -as [datetime]}... It works for me.
- JeremyTBradshawSteel Contributor
That does work, so I will have to lower my tude about this. Was a little passion flare there earlier this morning.
- JeremyTBradshawSteel Contributor
You know, I just realized this morning that the output of Get-RecoverableItems actually stores "LastModifiedTime" as a string, rather than as a datetime object. This makes sorting in PowerShell a game of text twist. Really annoying to see this kind of thing happen in real life:
At one point in time, the Exchange team were almost like the pioneers of PowerShell.
I'll send a little note to the developers...