Forum Discussion
PS83Tech
Feb 26, 2021Brass Contributor
PS command to list sahred mailbox + distro list membership for specific user
I’m looking a for a powershell command I can run to get a list of all the distro groups and shared mailboxes a specific user is a member of, but I cannot seem to find one that would do that. I kn...
VasilMichev
Feb 27, 2021MVP
Not sure where exactly you looked, but there are tons of examples on how to do it available online. For Full access, check here: https://www.michev.info/Blog/Post/1516/quickly-list-all-mailboxes-to-which-a-particular-user-has-access
For group membership, this is the most efficient way:
Get-Recipient -Filter "Members -eq 'CN=user,OU=domain.onmicrosoft.com,OU=Microsoft Exchange Hosted Organizations,DC=EURPR03A001,DC=prod,DC=outlook,DC=com'"
where you have to specify the DistinguishedName for the user.
For group membership, this is the most efficient way:
Get-Recipient -Filter "Members -eq 'CN=user,OU=domain.onmicrosoft.com,OU=Microsoft Exchange Hosted Organizations,DC=EURPR03A001,DC=prod,DC=outlook,DC=com'"
where you have to specify the DistinguishedName for the user.