Skip to content

Instantly share code, notes, and snippets.

@win2000b
Created August 10, 2020 08:48
Show Gist options
  • Save win2000b/6e1f2140a70a13a33776d45b18b8595b to your computer and use it in GitHub Desktop.
Save win2000b/6e1f2140a70a13a33776d45b18b8595b to your computer and use it in GitHub Desktop.
Remove Holds and then query
$mailboxes = Get-Mailbox
foreach ($mailbox in $mailboxes)
{
set-mailbox $mailbox.Alias -removedelayholdapplied
set-mailbox $mailbox.Alias -removedelayreleaseholdapplied
}
$mailboxes = Get-Mailbox
foreach ($mailbox in $mailboxes)
{
Get-Mailbox $mailbox.Alias |FL *HoldApplied*
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment