PS command to list sahred mailbox + distro list membership for specific user

Occasional Contributor

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 know I can run a command on a specific shared mailbox to get a list of members but when I have to setup a new user and give him/her the same access as someone else it would be more efficient to run a command that can show me what User A's memberships are so I can give them to User B

1 Reply
Not sure where exactly you looked, but there are tons of examples on how to do it available online. For Full access, check here:
For group membership, this is the most efficient way:

Get-Recipient -Filter "Members -eq 'CN=user,,OU=Microsoft Exchange Hosted Organizations,DC=EURPR03A001,DC=prod,DC=outlook,DC=com'"

where you have to specify the DistinguishedName for the user.