PS for User Passwords

hi all new to PS but I have setup the following

and the 3 below commands work as I need them to, but my issues I have 400 accounts that I need to do the below on

I have all the usernames in a txt / csv file but cant file a way to run the below on in bulk :frowning:

any help would be great

Many Thanks

Set-ADUser -Identity USER1 -ChangePasswordAtLogon $true
set-aduser user1 -PasswordNeverExpires $false
Set-ADAccountPassword jliebert -Reset -NewPassword (ConvertTo-SecureString -AsPlainText “myP@ssw0rd112” -Force -Verbose) –PassThru

Tech123,
Welcome to the forum. :wave:t4:

Regardless ot the fact that resetting the password for so many users at once is a really bad idea and setting it to the same one for all of them even with one you have in clear text in a script file is even worse you need to read the TXT file with

or the CSV file with

and you can iterate over the resulting array elements with either

or

Regardless of that … most of the time you’re not the first one with a given task. I’d recommend to use your favorite internet search eingine to search for examples of code you can adapt to your needs. Try to learn from others code - you don’t need to re-invent the wheel again and again. :wink: