OR in AD cmdlets

Starting with version 1.3 you can make multiple queries in a single Get-QAD* call. This is possible because a lot of parameters now accept arrays.

So, if you are interested for example in all users from London or Seattle you can just do:

Get-QADUser -City 'London', 'Seattle'

Wildcards are also accepted:

Get-QADComputer -Name 'A*','B*'

You can nicely combine some of these with output from other cmdlets – e.g. to find all groups managed by users from your team:

Get-QADGroup -ManagedBy (Get-QADUser -Manager 'Dmitry Sotnikov')

And you can obviously keep using the old way of specifying just one value, and combine various parameters in one call. For example getting a list of your pre-sales and professional services employees from the West coast for a training could be as easy as:

Get-QADUser -Enabled -Office ('CA', 'OR', 'WA') -Department ('Pre-sales', 'PSO')

Full list of parameters which now accept arrays can be found on page 21 of the AD cmdlets Administrator’s Guide, and you can find full help information for any of the cmdlets in our online reference.

Hope this makes your AD administration even more enjoyable! 😉


0 Responses to “OR in AD cmdlets”

  1. Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

My Recent Tweets


The posts on this blog are provided “as is” with no warranties and confer no rights. The opinions expressed on this site are mine and mine alone, and do not necessarily represent those of my employer - WSO2 or anyone else for that matter. All trademarks acknowledged.

© 2007-2014 Dmitry Sotnikov

December 2009
« Nov   Jan »

%d bloggers like this: