Dynamic Distribution Group for Managers

Has anyone created a DDG based on managers? I am using the below but the preview shows no results.

Set-DynamicDistributionGroup managersall -RecipientFilter { (RecipientType -eq 'MailUser') -and (directReports -eq $null) -and (RecipientTypeDetailsValue -ne 'RoomMailBox') -and (RecipientTypeDetailsValue -ne 'EquipmentMailbox') -and (RecipientTypeDetailsValue -ne 'MailContact') -and (RecipientTypeDetailsValue -ne 'MailUniversalDistributionGroup') -and (RecipientTypeDetailsValue -ne 'MailUniversalSecurityGroup') -and (RecipientTypeDetailsValue -ne 'MailNonUniversalGroup') -and (RecipientTypeDetailsValue -ne 'DynamicDistributionGroup') -and (RecipientTypeDetailsValue -ne 'PublicFolder') } 

submitted by /u/bigboijoey
[link] [comments]

Leave a Reply