missymadi
asked on
How do I include many user names to my Powershell script to reset Passwords?
Experts,
How do I add more users to my script to update their password?
Thanks, Missymadi
How do I add more users to my script to update their password?
Thanks, Missymadi
$users = get-qaduser -samaccountname USERNAME
$users | %{
set-qaduser -Userpassword 'Test'
get-qaduser -samaccountname $_.samaccountname | Select samaccountname, passwordlastset | out-file c:\PwdChanged.txt -noclobber
}
ASKER
How would I add a line that notifies the user that the script completed?
The user running the script or the user that is having the password changed?
ASKER
The user running the script.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
$users = get-qaduser -searchbase "OU=Users_OU,DC=Domain,DC=
$users = get-content c:\users.txt
$users = @(
"User1"
"User2"
"User3"
)