I'm trying to change domain users passwords with VBS script. I got it to work with passwords, but now I need it to prompt them to change it when they first log on. I'm not sure what I'm missing.
strUser = InputBox ("Enter User Name")
On Error Resume Next
Set objUser = GetObject("WinNT://domain/" & strUser &", User")
objUser.SetPassword ("Password")
objUser.Put "pwdLastSet", 0
objUser.SetInfo
If Err.Number <> 0 Then
MsgBox "Error..."
Err.Clear
Else
MsgBox "The password has been changed for " & strUser &"
End If