Filter to find Disabled users in Active Directory

rated by 0 users
This post has 0 Replies | 1 Follower

Top 10 Contributor
Posts 211
Top Contributor
Krishna Posted: 01-20-2010 9:00 AM

 

$Search = New-Object DirectoryServices.DirectorySearcher([ADSI]“”)
$Search.filter = “(&(objectClass=user)(userAccountControl:1.2.840.113556.1.4.803:=65536))”
$Search.PageSize = 1000
$results = $Search.Findall()

 

Regards,

Krishna

Page 1 of 1 (1 items) | RSS
Concentrated Tech NSoftware Dell Compellent Sponsored by Idera and Concentrated Tech and NSoftware and Dell Compellent
Copyright 2011 PowerShell.com. All rights reserved.