Forum Discussion

ABill1's avatar
ABill1
Iron Contributor
Oct 24, 2023
Solved

How to change user passwords in bulk - without force to change

Hello everyone,   I'm in the process of updating the passwords for multiple users, and I'd like to set specific passwords of my choice. Additionally, I want to ensure that these accounts won't prom...
  • ABill1's avatar
    Oct 25, 2023

    Hi Kidd_Ip darlene22xx 

     

    I tried them however they didnt work anymore for me I had to use: Import-Csv ".\Sample7users.csv" -Delimiter "," -Encoding UTF8 | ForEach-Object {
            $user = Get-AzureADUser -Filter "userPrincipalName eq '$($_.upn)'"
            $secureString = ConvertTo-SecureString ($_.pw) -AsPlainText -Force
            Set-AzureADUserPassword -ObjectId $user.ObjectID -Password $secureString -ForceChangePasswordNextLogin $false
        }

     

Resources