command to get O365 mailbox member of

hello experts
i need you help teach a command
i need get a group list which a user mailbox is member of it, do you know how to promote this command?

thank you
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Rainer JeschorCommented:

there is a nice script in the Microsoft Powershell Gallery:

This lists all distribution groups memberships. The generated CSV file can then be imported into Excel and you can then apply filter on it.

beardog1113Author Commented:
hello Rainer
is there any more easy way? because i am not good at scripts even can't read it.
also this way which you paste which involve all distribute group, i guess it will need long time to compete, but need read a mailbox member of frequently.

thank you
Vasil Michev (MVP)Commented:
This is the fastest/easiest way:

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

Open in new window

To get the DN of the user, use:

Get-Mailbox vasil | select DistinguishedName

Open in new window

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
beardog1113Author Commented:
thats great, this is what i need.
thank you
beardog1113Author Commented:
thank you
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Office 365

From novice to tech pro — start learning today.