posts - 598 , comments - 849 , trackbacks - 247

My Links

News

qrcode

Lance Robinson

Create Your Badge

Lance Robinson is a software engineer in Durham, Chapel Hill, Raleigh, and surrounding areas. More about Lance.

 Subscribe

Tag Cloud

Archives

Blogs

Miscellanous

Noteworthy Stuff

Popular Posts

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 | Filed Under [ PowerShell ]

Feedback

No comments posted yet.
Post A Comment
Title:
Name:
Email:
Comment:
Verification:
 

Powered by: