Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Get-DistributionGroupMember Recursive Functionality.

$
0
0

I’m looking to create a script that can use a list of groups to go through and get me the members of each group.

Example

$group = Get-DistributionGroupMember –identity “Group Name” | Select DisplayName

Now the content of $group will be a list of Distribution Groups, I need to use this as the input to create a CSV file of all the members of each of the groups in $group.

Can someone help me with this?

Ideally if Get-DistributionGroupMember had a recursive function I wouldn’t need to figure out a way to do this. I have seen a couple enumeration scripts around, but I’m not getting exactly the results I need. Any help would be appreciated.

 


Paul Arbogast

Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>