Solved

new-DynamicDistributionGroup

Posted on 2014-12-02
3
394 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

Industry Leaders: 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

Lotus Notes – formerly IBM Notes – is an email client application, while IBM Domino (earlier Lotus Domino) is an email server. The client possesses a set of features that are even more advanced as compared to that of Outlook. Likewise, IBM Domino is…
Windows 10 came with  a lot of built in applications, Some organisations leave them there, some will control them using GPO's. This Article is useful for those who do not want to have any applications in their image (example:me).
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…
how to add IIS SMTP to handle application/Scanner relays into office 365.

726 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