‎07-10-2012 07:58 PM
‎01-24-2013 04:29 PM
‎08-23-2012 01:12 AM
If WScript.Arguments.Count = 1 Then
struser= WScript.Arguments(0)
Set objUser = GetObject("LDAP://" & struser)
strCN = objUser.Get("cn")
chgmsg = MsgBox("Do you want to Force " & strCN & " to" & VbCrLf & _
" Change his/her Password at Next Logon?" & VbCrLf & VbCrLf & _
"'Yes' will set a default password and require a change at next logon." & VbCrLf & _
VbTab & "- Use 'Yes' for users in the office." & VbCrLf & VbCrLf & _
"'No' will ask you to set the password; it will not require it to be changed." & VbCrLf & _
VbTab & "- Use 'No' for remote users as they cannot change an " & VbCrLf & _
VbTab & " expired password remotely." & VbCrLf & VbCrLf & _
"'Cancel' will cancel the operation." _
, 547, "Force " & strCN & " to Change Password At Next Logon?")
If chgmsg = 6 Then
objUser.SetPassword("Change1now")
objUser.pwdLastSet = 0
objUser.SetInfo
msgbox "Password changed to: Change1now" & VbCrLf & VbCrLf & _
" - It Must Be Changed At Next Logon!",,strCN & "'s password has been changed!"
end if
If chgmsg = 7 Then
password1=InputBox("Enter " & strCN & "'s new password:",strCN)
password2=InputBox("Confirm " & strCN & "'s new password:",strCN)
if password1 <> "" then
if password1=password2 then
objUser.SetPassword(password1)
msgbox strCN & "'s password has been changed to: " & password1,,strCN & "'s password has been changed!"
else
msgbox "The passwords do not match",,"Error, try again"
end if
else
msgbox "The password cannot be blank",,"Error, try again"
end if
end if
end if
‎11-10-2012 12:24 PM
‎01-31-2013 09:04 PM
tbayer wrote:
Hi Jono,
where exactly do I need to insert your script?
Thanks!
‎07-17-2012 03:47 PM
‎07-13-2012 02:29 AM
‎07-12-2012 09:39 PM
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now