Forum Discussion

TonyRedmond's avatar
Sep 18, 2024

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

  • BTW, why not do something like Get-RecoverableItems -Identity Jack.Smith | Sort-Object {$_.LastModifiedTime -as [datetime]}...  It works for me.

    • JeremyTBradshaw's avatar
      JeremyTBradshaw
      Steel Contributor

      That does work, so I will have to lower my tude about this.  Was a little passion flare there earlier this morning.

  • 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.

Resources