Get User Hold Policies

Update: This script has moved to the PowerShell Gallery.  All future updates will be posted at: https://www.powershellgallery.com/packages/Get-UserHoldPolicies/If you've ever wanted to be able to track down all of the policies and ways that a mailbox's data might be held, this mi

 
 
 
 
 
(0)
2,179 times
Add to favorites
Office 365
4/20/2020
E-mail Twitter del.icio.us Digg Facebook
  • want to export reteand ntion holds startdate and enddate
    2 Posts | Last post January 28, 2020
    • I used this but it didn't pull the dates. Any idea?
      Get-Mailbox | where {$_.RetentionHoldEnabled -eq $true} | Select Name, StartDateForRetention, EndDateforRetention | Export-Csv C:\mine4.csv
    • Then you don't have any mailboxes with the RetentionHoldEnabled property set.
  • this PowerShell is not working for us
    2 Posts | Last post January 28, 2020
    • we keep getting 
      Get-Mailbox : The term 'Get-Mailbox' is not recognized as the name of a cmdlet, function, script file, or operable
      program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
      At line:1 char:1
      + Get-Mailbox -Resultsize Unlimited | .\Get-UserHoldPolicies.ps1
      + ~~~~~~~~~~~
          + CategoryInfo          : ObjectNotFound: (Get-Mailbox:String) [], CommandNotFoundException
          + FullyQualifiedErrorId : CommandNotFoundException
    • Looks like you're not connected to Exchange Online.  If you're trying to pipe the output of Get-Mailbox into this script, you'll need to connect to EXO first.