Created
October 28, 2022 10:36
-
-
Save Fantasillion/70aec13b69fa4482773f0d02c48b512d to your computer and use it in GitHub Desktop.
Office 365 List membership groups for each user
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(Get-DistributionGroup).identity | ForEach-Object{ | |
$DistributionGroupName = $_ | |
Get-DistributionGroupMember -Identity $_ | ForEach-Object{ | |
[PSCustomObject]@{ | |
DistributionGroup = $DistributionGroupName | |
MemberName = $_.Name | |
#Other recipient properties here | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment