I am looking for a quick way to enumerate what mailboxes are using a specific retention policy, using the shell. When you open the EMC, you can open the retention policy properties and go to the Mailboxes tab and see all mailboxes using that policy.
However, I don't see a simple way to do this in the shell without using Get-Mailbox and filtering using the Where-Object (or ?) to filter by retention policy. This works OK in a small environment, but we have 15,000 mailboxes and some of our policies
only have 8 mailboxes in them. I don't want to run "Get-Mailbox -ResultSize Unlimited | ? { $_.RetentionPolicy -eq '<policy name>' } for a policy with only 10 mailboxes, and it appears that the GUI is able to pull the data more quickly than
that command would. My question, then, is "How does the GUI do it, and how can I do it with the shell?"
↧