[EXO][PS] Find all the Distribution Groups a user is a member of.
Quickly find out all the Distribution Groups a user is a member of with a few lines of simple PS code.
1 2 3 |
$Username = "johnsmith@hiepic.com" $DistributionGroups = Get-DistributionGroup -ResultSize unlimited | where { (Get-DistributionGroupMember -ResultSize unlimited $_.Name | foreach {$_.PrimarySmtpAddress}) -contains "$Username"} $DistributionGroups |
Recent Comments