Below is a quick script to quickly change a users password in Office 365 using PowerShell. The script will prompt you to connect to Office 365. You will then need to enter the users UPN and new password. It will also ensure they do not need to change the password on first log in. This can however be changed by chaging the “-ForceChangePassword” parameter to “$true”
I have included a download link at the bottom of the post.
$EmailAddress = read-host -Prompt "Please enter UPN"
$Password = read-host -Prompt "Please enter new password"
Set-MsolUser -UserPrincipalName $EmailAddress -StrongPasswordRequired $False
Set-MsolUserPassword -UserPrincipalName $EmailAddress -NewPassword $Password -ForceChangePassword $false
Write-host "Password changed successfully for account $EmailAddress" -foregroundcolor green