Link to home
Start Free TrialLog in
Avatar of SAM IT
SAM IT

asked on

Rest AD ID password for multiple users

Below script looks fine I think... but getting error post execution. I have attached the error screenshot FYR...Thanks in advance


Import-Module activedirectory
$Resetpassword = Import-Csv C:\temp\inputfile.csv
 
foreach ($Account in $Resetpassword) {
    $Account.SAMAccountName
    $Account.Password
        Set-ADAccountPassword -Identity $Account.SAMAccountName -NewPassword
( ConvertTo-SecureString $Account.Password -AsPlainText -force)
}

Open in new window

Windows-Server-2008-R2-x64-2017-12-1.png
ASKER CERTIFIED SOLUTION
Avatar of oBdA
oBdA

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of SAM IT
SAM IT

ASKER

thanks a lot for quick response
Avatar of SAM IT

ASKER

thanks a lot for quick response