Or if you're just looking for the ldap search filter syntax, try:
((objectCategory=Person)(userAccountControl:1.2.840.113556.1.4.803:=2))
This uses a bitwise filter. For further details have a look at
http://support.microsoft.com/default.aspx?scid=KB;EN-US;Q269181;
Tony
-- Original
pio eqbal wrote:
Hi,
is there an attribute in the user class, that I can
use in the LDAP query to find if the user account is
disabled? If so what is the name of the attribute?
Look at userAccountcontrol.
al
--
Al Lilianstrom
CD/OSS/CSI
[EMAIL PROTECTED]
List info :
How about this...
Option Explicit
Dim objUser
Dim objAccountDisabled
Set objUser = GetObject(LDAP://CN=User,DC=Domain,DC=MSFT;)
If objUser.AccountDisabled = True Then
objAccountDisabled = Yes
Else objAccountDisabled = No
End If
WScript.Echo objAccountDisabled