Regularly updating user passwords is essential for maintaining security within an organization. In this post, we will provide a PowerShell script that allows administrators to reset passwords for multiple Active Directory user accounts in bulk using a CSV file. This method saves time and ensures that all users can be updated simultaneously. At ServerEngine, we deliver powerful tools for optimizing server administration.
powershell
Import-Module ActiveDirectory
function Reset-ADUserPasswords {
param (
[string]$csvPath
)
$users = Import-Csv -Path $csvPath
foreach ($user in $users) {
$username = $user.UserName
$newPassword = $user.NewPassword
try {
$securePassword = ConvertTo-SecureString $newPassword -AsPlainText -Force
Set-ADAccountPassword -Identity $username -NewPassword $securePassword
Write-Host "Successfully reset password for user: $username"
} catch {
Write-Host "Failed to reset password for user: $username. Error: $_"
}
}
}
Reset-ADUserPasswords -csvPath "C:\Path\To\Your\passwords.csv"Run it across your fleet
This script runs as-is on a single host. Paste it into ServerEngine to schedule it, run it on a whole server group in parallel, and keep the credentials out of the file — see the scripts documentation and the credential store.
More in Active Directory
Active Directory User Onboarding with PowerShell
2026-08-17Active Directory User Offboarding with PowerShell
2026-08-17Disable an Active Directory User with PowerShell
2026-08-17Enable an Active Directory User with PowerShell
2026-08-17Unlock an Active Directory Account with PowerShell
2026-08-17Reset an Active Directory Password with PowerShell
2026-08-17Ready when you are.
Try ServerEngine free for 7 days.