Disable a Local User Account

Disables the local Guest account on a computer named atl-ws-01.

VBScript Code


strComputer = "atl-ws-01"
Set objUser = GetObject("WinNT://" & strComputer & "/Guest")

objUser.AccountDisabled = True
objUser.SetInfo