none
Unable to create working dynamic distribution list based on manager RRS feed

  • Question

  • Hi,

    I am struggling to create a working dynamic distribution group. I am following the instructions at http://help.outlook.com/en-gb/140/Dd264647.aspx.

    My intent is to create DDG's based on a user's manager and their job title. In my org, sales managers will typically have 3 teams reporting to them. In our AD, this would be marked by a 3-4 letter acronym in the job title field (CSO,DCO,SDCO).

    I am trying to create distribution groups for use by their manager by having the manager and job title item as the filter, using the following script:

    New-DynamicDistributionGroup -Name "GROUPNAME" -RecipientFilter {(RecipientType -eq 'UserMailbox') -and (manager -eq 'Managername') -and (title -eq 'ACRONYM')}

    As an aside, I am unable to find if the manager object should be an alias, upn or ad object. I've tried with all with no success.

    No matter what permutations of the above script I try, nothing seems to work. The group creates, but does not work at all.

    Any help you can provide would be very much appreciated!

    Wednesday, October 15, 2014 8:40 AM

Answers

  • We now have it working!

    As it turns out, strangely you need to use a -like operator as well as using the distinguished name of the manager object. Seems slightly counter-intuitive, but it works.

    For reference, the script is below.

    new-dynamicdistributiongroup -name "groupname" -recipientfilter {(recipienttype -eq 'usermailbox') -and (manager -like 'CN=Name,OU=Users,DC=domain,DC=local') -and (title -eq "Job Title")}

    Hope this helps some of you out there!

    Friday, October 17, 2014 8:51 AM

All replies

  • Try it first with a single criterion, e.g., {(Manager -eq "manager@company.com")}.  Then if it works, add the next criterion, e.g., {(Manager -eq manager@company.com) -and (Title -eq "CSO")}, and so on.  If it doesn't work, make sure that you actually have recipients that match the criteria.

    Note that the Title must be exactly the acronym.  If a title can contain additional text, try (Title -like "*CSO*").


    Ed Crowley MVP "There are seldom good technological solutions to behavioral problems."

    Friday, October 17, 2014 6:47 AM
    Moderator
  • Hi Ed,

    I did try that, and as it turned out, I was using the wrong powershell from the start.

    The commands above are for Office 365, not on-prem Exchange 2013. Having spoken to Microsoft, it seems like the AD object for manager may not be a filterable option at all, I'm waiting to hear back.

    If this can help jog anyone's mind, the commands we're looking towards now look something like this:

    New-DynamicDistributionGroup -Name "testname" -Alias "testname" -IncludedRecipients "MailboxUsers,MailContacts" -OrganizationalUnit "domain.local/users" -ConditionalDepartment "Test" -RecipientContainer "domain.local"

    We're still looking for a filter for manager in there, and I'll update the thread if I get anything worthy of note. Bear in mind that it's going to be difficult to settle for anything less than the manager object to filter by, as our requirements pretty much demand it.

    Thanks all.

    Friday, October 17, 2014 7:54 AM
  • We now have it working!

    As it turns out, strangely you need to use a -like operator as well as using the distinguished name of the manager object. Seems slightly counter-intuitive, but it works.

    For reference, the script is below.

    new-dynamicdistributiongroup -name "groupname" -recipientfilter {(recipienttype -eq 'usermailbox') -and (manager -like 'CN=Name,OU=Users,DC=domain,DC=local') -and (title -eq "Job Title")}

    Hope this helps some of you out there!

    Friday, October 17, 2014 8:51 AM
  • Thanks for this... very helpful!
    Friday, November 20, 2015 12:03 PM
  • Running into this problem myself. Tried to create one with the -like operator and no luck. If i create any other DDL without the Manager attribute it operates and populates users as expected.

    Have also tried the -eq operator for Manager with no luck. 

    Any other ways to try to have the list be manager based?

    Thank you

    Thursday, May 18, 2017 3:47 AM