PowerShell

View members of a dynamic distribution group

Recently I noticed it wasn’t easy to view members of a dynamic distribution group, which was set up by a somewhat incapable sysadmin. The following line shows how the list was set up: ((((((((((((((((((((CustomAttribute1 -eq ‘All_everyone’) -or (Company -eq ‘[companyname1]’))) -or (Company -eq ‘[companyname2]’))) -and (((((RecipientType -eq ‘UserMailbox’) -or (RecipientType -eq ‘MailUser’))) -or (RecipientType -eq …