LDAP PowerShell - Search for Disabled User Accounts

 

PS C:\> get-ldap -server testboy -cred $mycred -dn dc=JUNGLE -searchscope wholesubtree 
-search "(&(objectclass=user)(objectclass=person)(company=*)(userAccountControl:1.2.840.113556.1.4.803:=2))"

 

Again, there's no need for dozens of LDAP cmdlets.  The two LDAP cmdlets included in NetCmdlets, get-ldap and set-ldap, are all you need for most tasks.  The above command shows how you would search for disabled user accounts with the get-ldap cmdlet.

Print | posted on Tuesday, August 14, 2007 10:51 AM

Feedback

No comments posted yet.

Your comment:





 
 

Copyright © Lance Robinson

Design by Bartosz Brzezinski

Design by Phil Haack Based On A Design By Bartosz Brzezinski