bulk change password with csv file
I see where I can use tool.exe to bulk change passwords to the same password but can I use a CSV file to bulk change passwords that are all different?
Thanks!!
-
ForEach($user in (Import-CSV 'c:\my.csv'))
{
Set-ADAccountPassword -Identity $user.identity -NewPassword (ConvertTo-SecureString -String $user.password -AsPlainText -Force)
# Where identity is a column in the csv that holds a valid identity like the sam account name
# and where password is the column header in the csv with their plain text password.
}You can do something like that.
-
use the bulk update tool to reset the password for multiple users. The bulk update tool comes with a CSV template that allows you to bulk update user account properties. In addition to resetting passwords, you can update users’ display name, email addresses, company, department, address, and more.
website
Please sign in to leave a comment.
Comments
5 comments