Solved

new-DynamicDistributionGroup

Posted on 2014-12-02
3
417 Views
Last Modified: 2014-12-02
Trying to get a DDL set up that excludes a group of people based on there custom attribute see the command below and error I am getting

Command

new-DynamicDistributionGroup -Name 'All Test DL' -RecipientContainer 'contso.com/new' -IncludedRecipients 'MailboxUsers' -ConditionalCustomAttribute9 -notlike 'NOALL' -OrganizationalUnit 'contso.com/new' -Alias 'AllTestDL'


Error

A positional parameter cannot be found that accepts argument 'NOALL'.
    + CategoryInfo          : InvalidArgument: (:) [New-DynamicDistributionGroup], ParameterBindingException
    + FullyQualifiedErrorId : PositionalParameterNotFound,New-DynamicDistributionGroup


Please let me know what I am missing
0
Comment
Question by:SEHC
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 37

Expert Comment

by:Jamie McKillop
ID: 40476798
Hello,

You can't use an operator with switches. So, if you are going to use the -ConditionalCustomAttribute switches, they need to equal the value you set. If you want to use an operator, you need to use a recipient filter.

Like this:

New-DynamicDistributionGroup -Name 'All Test DL' -RecipientContainer 'contso.com/new' -IncludedRecipients 'MailboxUsers'  -OrganizationalUnit 'contso.com/new' -Alias 'AllTestDL' -RecipientFilter {(CustomAttribute9 -notlike 'NOALL*')} 

Open in new window


-JJ
0
 
LVL 4

Author Comment

by:SEHC
ID: 40476811
getting this error now

Parameter set cannot be resolved using the specified named parameters.
    + CategoryInfo          : InvalidArgument: (:) [New-DynamicDistributionGroup], ParameterBindingException
    + FullyQualifiedErrorId : AmbiguousParameterSet,New-DynamicDistributionGroup
0
 
LVL 37

Accepted Solution

by:
Jamie McKillop earned 500 total points
ID: 40476854
Sorry, you need to remove the -includedrecipients switch when using the -recipientfilter switch.

-JJ
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The Nano Server Image Builder helps you create a custom Nano Server image and bootable USB media with the aid of a graphical interface. Based on the inputs you provide, it generates images for deployment and creates reusable PowerShell scripts that …
This article will help to fix the below error for MS Exchange server 2010 I. Out Of office not working II. Certificate error "name on the security certificate is invalid or does not match the name of the site" III. Make Internal URLs and External…
To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question