• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 51
  • Last Modified:

Get-mailbox permission

Experts -

Trying to get something going to get permissions for mailboxes for our IT Team and nothing I'm doing to get the results is working. Please assist.

Get-Mailbox -server1, server 2, | Get-MailboxPermission -User user1, user2, user3

Practically that's what I need as seen above.
get to query our couple mailbox servers and then get what mailbox permissions user1-user3 have.
I want to be able to export this report to a share and send an email letting users1-3 that the report is ready

Please assist when you have a moment.

1 Solution
QlemoBatchelor, Developer and EE Topic AdvisorCommented:
You cannot use more than one user as parameter for Get-MailboxPermission, and the Get-Mailbox syntax is incorrect too (same reason and typos).
If you have to process several servers and users you'll have to loop thru both. E.g. with
  foreach ($server in 'server1', 'server2')
    Get-Mailbox -server $server |
    % {
      $mb = $_ 
      'user1', 'user2' | Get-MailboxPermission -identity $mb.identity -user $_ 

Open in new window

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Protect Your Employees from Wi-Fi Threats

As Wi-Fi growth and popularity continues to climb, not everyone understands the risks that come with connecting to public Wi-Fi or even offering Wi-Fi to employees, visitors and guests. Download the resource kit to make sure your safe wherever business takes you!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now