18
Feb/10
0

Set the local User Password remotely via script

3 simple Lines that update a local account using WinNT on a computer.
Requires 3 Arguments:
[Machine Name] [Local User] [New Password]

1
2
3
4
5
6
7
If (WScript.Arguments.Count < 3) Then
   WScript.Echo "3 Arguments required: [Machine Name] [Local User] [New Password]"
   WScript.Quit 1
End If
Set objUser = GetObject("WinNT://" & WScript.Arguments(0) & "/" & WScript.Arguments(1) & ", user")
objUser.SetPassword WScript.Arguments(2)
objUser.SetInfo
Print This Post
(2 votes, average: 5.00 out of 5)
Loading ... Loading ...
235 views
Comments (0) Trackbacks (0)

No comments yet.

Leave a comment


No trackbacks yet.