Q. How can I use Microsoft Active Directory Service Interfaces (ADSI) to check a user's enabled or disabled state?

A. Each user object has an AccountDisabled property. To check whether an account is disabled, you can run a simple script that uses a True or False condition statement, such as this:

If objChild.AccountDisabled Then
    objDisabledStat = "Y"
    objDisabledStat = "N"
End If
Hide comments


  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.