Is Dynamic Distribution Group Based on Manager and Reportees possible without custom attribute?

Manojkumar Mohan 21 Reputation points
2022-10-26T13:33:54.3+00:00

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

Microsoft Exchange Online Management
Microsoft Exchange Online Management
Microsoft Exchange Online: A Microsoft email and calendaring hosted service.Management: The act or process of organizing, handling, directing or controlling something.
3,895 questions
Exchange Server Management
Exchange Server Management
Exchange Server: A family of Microsoft client/server messaging and collaboration software.Management: The act or process of organizing, handling, directing or controlling something.
7,029 questions
0 comments No comments
{count} votes

Accepted answer
  1. Vasil Michev 85,646 Reputation points MVP
    2022-10-26T13:38:27.433+00:00

    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.


1 additional answer

Sort by: Most helpful
  1. KyleXu-MSFT 26,171 Reputation points
    2022-10-27T02:44:10.803+00:00

    @Anonymous

    Here is test in my tenant:
    254571-1.png

    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.


    0 comments No comments