Solved

new-DynamicDistributionGroup

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

Are end users causing IT problems again?

You’ve taken the time to design and update all your end user’s email signatures, only to find out they’re messing up the HTML, changing the font and ruining the imagery. What can you do to prevent this? Find out how you can save your signatures from end users today.

Join & Write a Comment

Suggested Solutions

Marketers need statistics and metrics like everybody else needs oxygen. In this article we explain how to enable marketing campaign statistics for Microsoft Exchange mail.
A procedure for exporting installed hotfix details of remote computers using powershell
The video tutorial explains the basics of the Exchange server Database Availability groups. The components of this video include: 1. Automatic Failover 2. Failover Clustering 3. Active Manager
how to add IIS SMTP to handle application/Scanner relays into office 365.

708 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now