Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2012
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Get-DistributionGroup | Sort -Property DisplayName | foreach {
  2. $grp = $_.DisplayName
  3. Get-DistributionGroupMember $grp | Sort -Property DisplayName | Select DisplayName, Alias, Department | foreach {
  4. $user = $_.displayname
  5. $out = $user + "," + $_.Alias + "," + $_.Department + "," + $grp
  6. $out
  7. }
  8. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement