I'm trying to find some way to create User Collections using powershell, based on AD information. Examples:
A collection that contains all the users in the City of "New York".
A collection that contains all the users in the Department of "Accounting".
Another collection that contains all the users in the Department of "Accounting" AND Manager = 'Henry Smith'.
Is this anyway possible to retrieve this information automatically so that I won't have to create all of these collections using the console GUI? I'd like to run a nightly tasks that would keep these collections updated, properly - but the scheduled run of these discovery methods should cover this, correct?
Thanks for any information out t
sure, there are the two cmdlets
New-CMUserCollection : http://technet.microsoft.com/en-us/library/jj821754(v=sc.10).aspx
Add-CMUserCollectionQueryMembershipRule : http://technet.microsoft.com/en-us/library/jj850093(v=sc.10).aspx
I would use a combination of those two to create the proper collections based on your AD information.