Archive for April 12th, 2010

Get Enabled or Disabled Computer Accounts

Here’s a quick workaround for the lack of -Enabled switch for Get-QADComputer. Unlike Get-QADUser it does not currently have the switch, however, so these two oneliners will come handy should you want to efficiently filter computers by their enabled/disabled status:

# Only disabled computer accounts
Get-QADComputer -ldapFilter (userAccountControl:1.2.840.113556.1.4.803:=2)

# Only enabled computer accounts
Get-QADComputer -ldapFilter (!(userAccountControl:1.2.840.113556.1.4.803:=2))

My Recent Tweets

Legal

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

April 2010
M T W T F S S
 1234
567891011
12131415161718
19202122232425
2627282930  

%d bloggers like this: