Mail Contact Group Membership

In Azure AD/Office 365, it is difficult to establish the groups a Mail Contact is a member of.

This is the PowerShell command I use to find out…

$strContact = Get-MailContact -Identity "steve.tester99@stakeford.com"

$strContactDN = $strContact.DistinguishedName

$ContactFilter="Members -like ""$strContactDN"""

Get-DistributionGroup -Filter $ContactFilter -ResultSize Unlimited | select DisplayName | sort DisplayName

Replace -Identity “steve.tester99@stakeford.com” with the Mail Contact’s email address.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s