Announcement

Collapse
No announcement yet.

Creation of dynamic distrubution list

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Creation of dynamic distrubution list

    My idea is to create a dynamic distribution list that will take users from one static group and exclude users from other static group. Example, I have:

    1st static group, user1, user2, user3, user4, user5
    2nd static group, user1, user2, user5

    I want to create a dynamic group that will have users 3 and 4 (include 1st group, than exclude 2nd)

    I looked up into technet, and check some articles, but my shell command doesn't want to work

    This is the command
    [PS] C:\Windows\system32>New-DynamicDistributionGroup -Name "Dynamic Group" -Alias "dynamicgroup" -Org
    anizationalUnit "domain.com/office/Distribution Lists" -RecipientFilter {((RecipientType eq 'MailUniversalDistributi
    onGroup') -and (alias eq 'firstgroup')) -and -not ((RecipientType eq 'MailUniversalDistribu
    tionGroup') -and (alias eq 'secondgroup'))} -RecipientContainer "domain.com"


    I get the following error:

    Invoke-Command : Cannot bind parameter 'RecipientFilter' to the target. Exception setting "RecipientFilter": "Invalid f
    ilter syntax. For a description of the filter parameter syntax see the command help.
    "((RecipientType eq 'MailUniversalDistributionGroup') -and (alias eq 'firstgroup')) -and -
    not ((RecipientType eq 'MailUniversalDistributionGroup') -and (alias eq 'secondgroup'))" at position
    17."


    If someone knows what I am doing wrong, please tell.

  • #2
    Re: Creation of dynamic distrubution list

    Use GUI and create query base Distribution group make sure your specify some type of attribute for example, company, dept, custom attribute, coz query will be based on those conditions and then it can pull the users into the dynamic group.
    Thanks & Regards
    v-2nas

    MCTS 2008, MCTIP, MCSE 2003, MCSA+Messaging E2K3, MCP, E2K7
    Sr. Wintel Eng. (Investment Bank)
    Independent IT Consultant and Architect
    Blog: http://www.exchadtech.blogspot.com

    Show your appreciation for my help by giving reputation points

    Comment


    • #3
      Re: Creation of dynamic distrubution list

      users in groups are from different cities/countries, have different managers, etc, no attribute that they can share

      Comment


      • #4
        Re: Creation of dynamic distrubution list

        If you check the PS code closely you are using filter
        RecipientFilter {((RecipientType eq 'MailUniversalDistributi
        onGroup') -and (alias eq 'firstgroup')) -and -not ((RecipientType eq 'MailUniversalDistribu
        tionGroup') -and (alias eq 'secondgroup'))}

        You need to use some attributes probably a custom attribute to make it work otherwise manual.
        Thanks & Regards
        v-2nas

        MCTS 2008, MCTIP, MCSE 2003, MCSA+Messaging E2K3, MCP, E2K7
        Sr. Wintel Eng. (Investment Bank)
        Independent IT Consultant and Architect
        Blog: http://www.exchadtech.blogspot.com

        Show your appreciation for my help by giving reputation points

        Comment


        • #5
          Re: Creation of dynamic distrubution list

          ok, and how can I with 2 custom attributes define what I want? Because, I didn't find anywere how to connect custom attributes with groups

          Comment

          Working...
          X