Identifies whether a user account is enabled or disabled.
Set objUser = GetObject _("LDAP://cn=myerken,ou=management,dc=fabrikam,dc=com")If objUser.AccountDisabled = FALSE ThenWScript.Echo "The account is enabled."ElseWScript.Echo "The account is disabled."End If
This is a VB Script, this can be used by saving the file in .vbs file