I want to get a list of all permissions for a specified list of mailboxes.
To get all permissions for just one, I can do this:
Get-MailboxPermission -Identity "Mailbox01"
What if I wanted to get a list of permissions for more than one mailbox at a time?
Something like:
Get-MailboxPermission -Identity "Mailbox01","Mailbox02","Mailbox03"
How could I do something like that - in one list?
something like this should work:
"Mailbox01","Mailbox02","Mailbox03" | % { Get-MailboxPermission -Identity $_ }
Have to use a foreach because Get-MailboxPermission
doesn't accept [string[]]
as pipeline input or you can do:
"Mailbox01","Mailbox02","Mailbox03" | get-mailbox | Get-MailboxPermission