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
Solved

need powershell assistance with an exchange group creation command

Posted on 2014-09-25
5
403 Views
Last Modified: 2014-10-05
hello, can someone provide the opath syntax to create a dynamic distribution group that will deliver the following results:
1. EmployeeID value is present [we have a value in the employeeID attribute in AD for all employees]
2. extenstionAttribute3 is not: 1a
3. extenstionAttribute10 is not: "Direct Selling"

thanks in advance.

S.
0
Comment
Question by:siber1
  • 3
5 Comments
 
LVL 13

Accepted Solution

by:
imkottees earned 500 total points
ID: 40345699
try this one....

New-DynamicDistributionGroup -Name "Full Time Employees" -RecipientFilter {(RecipientTypeDetails -eq 'UserMailbox') -and (EmployeeID -eq 'true') -and (CustomAttribute3 -ne '1a') -and (CustomAttribute10 -ne 'Direct Selling')}
0
 

Author Comment

by:siber1
ID: 40345912
hello Imkottees, here is the error i get when trying to include "employeeID" in the command:

[PS] C:\Windows\system32>New-DynamicDistributionGroup -Name "ztest5" -RecipientFilter {(RecipientTypeDetails -eq 'UserMa
ilbox') -and (EmployeeID -eq 'true') -and (CustomAttribute3 -ne '1a') -and (CustomAttribute10 -ne 'Direct Selling')}
Invoke-Command : Cannot bind parameter 'RecipientFilter' to the target. Exception setting "RecipientFilter": ""Employee
ID" is not a recognized filterable property. For a complete list of filterable properties see the command help.
"(RecipientTypeDetails -eq 'UserMailbox') -and (EmployeeID -eq 'true') -and (CustomAttribute3 -ne '1a') -and (CustomAtt
ribute10 -ne 'Direct Selling')" at position 48."

Open in new window

0
 
LVL 16

Expert Comment

by:Rajitha Chimmani
ID: 40346811
There is a restriction on properties which can be used in filters. The EmployeeID parameter cannot be used in the filter. Instead you can add EmployeeID to any customattribute and use that customattribute as a filter in this group.
0
 

Author Comment

by:siber1
ID: 40362386
I've requested that this question be closed as follows:

Accepted answer: 0 points for siber1's comment #a40345912

for the following reason:

thanks.
0
 

Author Closing Comment

by:siber1
ID: 40362387
thanks
0

Featured Post

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

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

Last week, our Skyport webinar on “How to secure your Active Directory” (https://www.experts-exchange.com/videos/5810/Webinar-Is-Your-Active-Directory-as-Secure-as-You-Think.html?cid=Gene_Skyport) provided 218 attendees with a step-by-step guide for…
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).
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles from a Windows Server 2008 domain controller to a Windows Server 2012 domain controlle…
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

828 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