No one has responded to this discussion for at least a year, so this information may be out of date. If you're looking for information about this topic, please search for a more recent discussion or post a new question.

Admin access to all mailboxes

  • 3 Followers
  • 3 Replies |
  • This post has 0 verified answers |
Not Answered This question is not answered

Several weeks ago I ran a PowerShell command so I could have access to all mailboxes.

Get-Mailbox -ResultSize unlimited -Filter {(RecipientTypeDetails -eq 'UserMailbox') -and (Alias -ne 'Admin')} | Add-MailboxPermission -User admin@domain.com -AccessRights fullaccess -InheritanceType all

Why is it that I still have access to NEW mailboxes?

 

Also if I run the command to remove admin access will also remove it for my mailbox?

Add-MailboxPermission user@example.com -User admin@example.com -AccessRights FullAccess -InheritanceType All

I don't think that I should still have the rights

Thank for any input you can give me

  • Post Points: 20
All Replies
  • Hi John,

    Based on my understanding you run command, Get-Mailbox -ResultSize unlimited … InheritanceType all, to grant you full access permission on all current mailbox. However, you found you have access permission to new created mailbox as well.  If I misunderstood your concerns please let me know.

    The issue was a little strange. So I would like to clarify how you know you have access permission on the new mailbox? Did you add the new mailbox to some groups? Did the issue occur if you create another new mailbox?

    Best regards,

    Alex Du

    • Top 75 Contributor
    • Post Points: 0
  • I can tell because i can use the drop down by my name and connect to the mailbox in OWA. This also happens for all NEW mailboxes that i have made.

    • Not Ranked
    • Post Points: 0
  • Hi John,

    I'm not sure why you are getting access to the new mailboxes. I ran the script you listed in your original post in my test account and I didn't get access to new mailboxes created after the script was run.

    If you want to remove permissions to the mailbox you can run this script:

    Add-MailboxPermission -Identity mailbox@domain.com -user user@domain.com -deny

    with mailbox being the the mailbox you want to remove permission to and user being your admin user account.

    This would work for a mailbox by mailbox approach, but if you want to do all of them at once you should be able to  user the same approach you took with your original script:

    Get-Mailbox -ResultSize unlimited -Filter {(RecipientTypeDetails -eq 'UserMailbox') -and (Alias -ne 'Admin')} | Add-MailboxPermission -user user@domain.com -deny

    Let me know if that helps,

    Dave

    • Top 500 Contributor
    • Male
    • Post Points: 0
Page 1 of 1 (4 items)