Requirements: A very common requirement is to modify the password for the ad user, but the problem is that the volume is too large. So I wrote a script.
Cls$pass = Convertto-securestring-asplaintext 12333333344.abc-forceimport-csv-path d:\pp.csv | foreach {get-aduser-identity $_.name| Set-adaccountpassword-reset-newpassword $passGet-aduser-identity $_.name| Set-aduser-changepasswordatlogon $false $_.name}
This script runs and requires a local module with Active Directory, which does not need to be imported manually and mounted automatically.
The above script changes the password, also sets whether the next login needs to change the password.
In the Foreach loop, you can add multiple actions to the user name, such as modifying properties, account expiration, etc.
The Pp.csv file content format that needs to be used is as follows
Namewangerxiaodongcunrui
This article is from the "Nine uncle-Microsoft Private Cloud" blog, please make sure to keep this source http://jiushu.blog.51cto.com/972756/1664283
PowerShell bulk Modify AD User Password properties