want to get list of distribution group that a user is member in cloud and on-prem dl

Hi,

I am trying to pull out the list of distribution group a user is member of using powershell.

Get-Memberof -Identity "user name"

But the problem is that i can only get the list of dl's for which user is member of for on-prem dl's and not for cloud dl's as the ad account memberof tab only consist the list of on-prem dl's only and not the dl's which are created directly on o365.

So is there a way to get the list of dl's for both type of dl i.e on-prem and dl's which are created directly on o365?

regards,

SSS

March 1st, 2015 7:18am

"Get-MemberOf" is not an Exchange or Active Directory cmdlet.  Did you obtain this from a third-party or develop it yourself?

If you query group membership on premises, you will see the on-premises memberships.  If you query a group membership in the cloud, such as using Exchange Online PowerShell, you will get the group memberships of the cloud user.

It can be confusing to use both on-premises groups and cloud groups for distribution groups, for the reasons you're finding out, but the answer to your problem is basically to always look at recipients in Exchange Online for group memberships because that's where both sets are combined.

Free Windows Admin Tool Kit Click here and download it now
March 2nd, 2015 5:47am

Hi Ed,

Is there anyway in which i can get member of list of exchange online in powershell or any other way?

Regards,

Sss

March 22nd, 2015 2:06am

You can use the Get-DistributionGroupMember cmdlet in a script.

https://technet.microsoft.com/en-us/library/aa996367%28v=exchg.150%29.aspx?f=255&MSPPError=-2147217396

I'm not in a good position to do this for you right now.  What you could do is get all distribution groups, then iterate through them and select the ones that have the desired user as a m

Free Windows Admin Tool Kit Click here and download it now
March 22nd, 2015 4:56pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics