If there anything to explain as how one can
get the restricted distribution groups with easily readable property
containing a string of users, below would be the script for you. Try :)
Get-DistributionGroup
-ResultSize Unlimited | where{$_.AcceptMessagesOnlyFromSendersOrMembers
-ne $null} | select
Name,@{Name="AcceptMessagesOnlyFromSendersOrMembers";Expression={[string]::join(";",($_.AcceptMessagesOnlyFromSendersOrMembers|
foreach {$_.name })
)}},@{Name="AcceptMessagesOnlyFrom";Expression={[string]::join(";",($_.AcceptMessagesOnlyFrom|
foreach {$_.name })
)}},@{Name="AcceptMessagesOnlyFromDLMembers";Expression={[string]::join(";",($_.AcceptMessagesOnlyFromDLMembers|
foreach {$_.name })
)}},DisplayName,SamAccountName,PrimarySmtpAddress,OrganizationalUnit,@{n="EmailAddresses";e={$_.EmailAddresses}},@{Name="ManagedBy";Expression={[string]::join(";",($_.ManagedBy
| foreach {$_.name }) )}},GroupType | Export-Csv
C:\RestrictedDLsReport.csv -NoTypeInformation
:)