How to Create a Dynamic Distribution Group based on format of employeeNumber field
That's not a filterable property. Here are some that are usable:
http://technet.microsoft.com/en-us/library/bb738157%28EXCHG.80%29.aspx
Would it be possible to add the id's as a custom attribute? You could filter on those.Mike Pfeiffer | blog: mikepfeiffer.net | twitter: @mike_pfeiffer
January 13th, 2012 1:21am
Strictly speaking, you can use whatever attribute you can execute a valid LDAP query against. We had to do this and I knocked up a post about it
here.
So, should it be done? Probably not.
Can it be done? Absolutely, so long as you're willing to work with the ongoing management caveats.
The one facet of your query I can't comment on is the third positional character. I haven't personally had to match something [x] characters along in an LDAP query, so I'm not sure if that's possible.
Certainly it's not possible with the wildcard character "*" for obvious reasons. And if you have a significant number of countries, it's not going to be much fun having [number of countries] x (co=..[EIC]*) statements (using regular expression syntax after
the = there; don't actually bother trying this as it won't work).
Cheers,
Lain
Free Windows Admin Tool Kit Click here and download it now
January 13th, 2012 2:30am
We have a standardized employee number system we use for employees, interns and contractors, it is <2 letter country code><E/I/C><5 digit number>, so the 2nd US employee is USE00002, the 4th US intern is USI00004. I am trying to create
a dynamic distribution group based on the following:
1) take the 1st 3 values (ie USE or USI) and create a group based on that, so I have a group that has all US employees and all US Interns
2) use ONLY the 3rd value (ie E/I/C) and create a group based on that, so I have a group that has all employees, all Interns, and all contractors
I cannot figure out the syntax for doing that. Any help is appreciated.
thanks,
Jason
January 21st, 2012 3:28pm
That's not a filterable property. Here are some that are usable:
http://technet.microsoft.com/en-us/library/bb738157%28EXCHG.80%29.aspx
Would it be possible to add the id's as a custom attribute? You could filter on those.Mike Pfeiffer | blog: mikepfeiffer.net | twitter: @mike_pfeiffer
Free Windows Admin Tool Kit Click here and download it now
January 21st, 2012 5:24pm
Strictly speaking, you can use whatever attribute you can execute a valid LDAP query against. We had to do this and I knocked up a post about it
here.
So, should it be done? Probably not.
Can it be done? Absolutely, so long as you're willing to work with the ongoing management caveats.
The one facet of your query I can't comment on is the third positional character. I haven't personally had to match something [x] characters along in an LDAP query, so I'm not sure if that's possible.
Certainly it's not possible with the wildcard character "*" for obvious reasons. And if you have a significant number of countries, it's not going to be much fun having [number of countries] x (co=..[EIC]*) statements (using regular expression syntax after
the = there; don't actually bother trying this as it won't work).
Cheers,
Lain
January 21st, 2012 6:33pm
As Mike Said if you could use Customattributes. It would be Easier of you.
Country Employe/intern/Contract Contract numbers
US E
00002
US I
00004
Criteria 1
All US Employees and all US interns
Set-DynamicDistributiongroup -identity "US-ALL" -RecipientFilter {Customattribute1 -like "USE*' -or 'Customatrribute1' -Like USI*}
USE*
USI*
Criteria 2
For US Employees alone
Set-DynamicDistributiongroup -identity "USE" -RecipientFilter {Customattribute1 -like 'USE*'}
For US Interns alone
Set-DynamicDistributiongroup -identity "USI" -RecipientFilter {Customattribute1 -like 'USI*'}
For US Contractors alone
Set-DynamicDistributiongroup -identity "USI" -RecipientFilter {Customattribute1 -like 'USC*'}
USE*
USI*
USC*
Happy Learning !!
Free Windows Admin Tool Kit Click here and download it now
January 21st, 2012 8:34pm
I ended up rethinking our whole need for the DL, reality is, it would be nice to be able to create a filter based on employeID or employeeType, so that I can have a dynamic DL that filters the type of employee an account is, employee, contractor, or intern.
Just to make it simple I wrote an extension script to the ADUC MMC that when you enter the employee ID, it automagically adds employee, intern, or contractor to extensionAttribute1. I would rather not do that, but to make it simple this was the
router I went.
Jason
January 21st, 2012 10:42pm
Got It Lain !!..
I misunderstood.
Edited
Free Windows Admin Tool Kit Click here and download it now
January 28th, 2012 9:10pm
Hi Jason,
Any updates?Frank Wang
TechNet Community Support
January 28th, 2012 10:06pm