strUserName = "maintain"
Set objWMIService = GetObject("winmgmts://./root/cimv2")
Set colItems = objWMIService.ExecQuery("Select * From Win32_UserAccount Where Name='" & strUserName & "'")
For Each objItem In colItems
objItem.PasswordExpires = False
objItem.Put_
Next
WScript.Echo "Done!"
阅读(2096) | 评论(0) | 转发(0) |