Archive for August 14th, 2007

Enable, Disable, Unlock User Accounts

One of the nice improvements of AD cmdlets 1.0.4 is the way you can enable, disable, and unlock AD user accounts with simple one-liners.

Here are a few oneliners demonstrating the new functionality:

#Get all disabled accounts
Get-QADUser -Disabled

#Get all locked accounts in the accounting department
Get-QADUser -Locked -Department Accounting

#Enable all the disabled accounts
Get-QADUser -Disabled | Enable-QADUser

#Unlock a specific user account
Unlock-QADUser DSotnikov

We kind of had a way of enabling the accounts before and Richard found a way to list locked out accounts quite some time ago but with 1.0.4 everything has become so much easier.

Dmitry

Tags: , , , , , , ,


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

August 2007
M T W T F S S
 12345
6789101112
13141516171819
20212223242526
2728293031  

%d bloggers like this: