It's possible, and you are using the correct filter syntax. If you are checking the members via the Get-DynamicDistributionGroupMember cmdlet, keep in mind that it can take up to 24h to populate all the members. You can "preview" the results via the Get-Recipient cmdlet and using the same filter.
Is Dynamic Distribution Group Based on Manager and Reportees possible without custom attribute?
Is Dynamic Distribution Group Based on Manager and Reportees possible?
I am trying to create dynamic distribution list using below command where it should populate all the reportees under a manager.
New-DynamicDistributionGroup -Name 'DDLName' -RecipientFilter {(Recipienttype -eq 'UserMailbox') -and (Manager -eq 'CN=XXX,OU=XXX,OU=US,OU=XXX,OU=XXX,DC=XXX,DC=XXX')}
The above command did work and created a DDL, however did not populate the members. Hence is the "Manager -eq" operator valid? Is there any other way to achieve this without using exchange custom attribute?
Current Environment :
On-prem AD
AAD connect
Exchange Online
1 additional answer
Sort by: Most helpful
-
KyleXu-MSFT 26,171 Reputation points
2022-10-27T02:44:10.803+00:00 Here is test in my tenant:
When use "-ne $null", I could find this mailbox. But cannot find this mailbox when use "Manager -eq "Admin_User"".
I helped you open an issue in the GitHub, we could wait to response from it: Issue about using "Manager" for -RecipientFilter
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.