Solved

new-DynamicDistributionGroup

Posted on 2014-12-02
3
342 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 your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

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…
A procedure for exporting installed hotfix details of remote computers using powershell
In this video we show how to create an Address List in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Organization >> Ad…
To show how to create a transport rule in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Mail Flow >> Rules tab.:  To cr…

911 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

20 Experts available now in Live!

Get 1:1 Help Now