This is a useful little script for pre-2008 domains* that checks to see if an account is locked out, and will unlock that account if it is.
I've used this as a scheduled task to ensure that a vital service account (used to auto logon to kiosk stations) does not become locked out.
' ----- Script Configuration -----
strUsername = "USERNAME"
strDomain = "DOMAIN"
' ----- End Configuration --------
set objUser = getObject("WinNT://" & strDomain & "/" & strUsername)
IF ObjUser.IsAccountLocked = TRUE then
objUser.IsAccountLocked = FALSE
objUser.Setinfo
end if
* For a 2008 domain I would create a PSO to achieve the same effect.
No comments:
Post a Comment