Extract DL and its member

Get all DL with the name - test

get-distributiongroup -ResultSize Unlimited | where{$_.displayname -like "*test*"} | ft displayname,managedby -AutoSize >> C:\new_folder\Manseau_DL.txt

 

Get all memeber of the mentioned DL name - DisplayName

Import-csv .\Man_DL.csv |foreach {Get-DistributionGroupMember -identity $_.DisplayName | ft $_.DisplayName,Name,RecipientType -AutoSize} >>C:\New_folder\Man_Owner_Member.txt

No comments: