Q. How can I use Microsoft Active Directory Service Interfaces (ADSI) to disable a user account?

John Savill

September 12, 2004

1 Min Read
ITPro Today logo

A. Assuming that you've already defined an objUser variable in a VBScript script that points to the user you want to disable, you can disable a user account by adding the following code to your script:

objUser.AccountDisabled = TrueobjUser.SetInfo

Read more about:

Microsoft

About the Author(s)

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like