With Microsoft’s recent announcement of the Set-MSOnlineUserPasswordNeverExpire PowerShell Command it’s now possible to set user’s passwords to never expire in your BPOS subscription. Below is a quick script to set all user’s passwords to never expire.

Before you can use the command you’ll need to download and install the latest version of the Microsoft Online Migration Tools. Then open the Migration Command Shell and run the following lines.

$creds = get-credential

$users = get-msonlineuser -enabled -resultsize 20000 -Credential $creds

$users | foreach {Set-MSOnlineUserPasswordNeverExpire -Identity $_.Identity -PasswordNeverExpire $True -Credential $creds}

Note that after the first line, you’ll be prompted for your BPOS Admin credentials. The last command should be run on a single line.

If you create new users after the script is run, you’ll need to either re-run the script, or use the Set-MSOnlineUserPassword on a one off basis to

Was this article helpful?
YesNo