How do I set user passwords not to expire in Office 365?

Follow

This can be accomplished via PowerShell. Note that this does not change the policy applied to new users, but instead changes existing user settings.

Pre-requisite: Connect to your Microsoft Online account using the PowerShell profile script provided on this site under Tips & Tricks, or load the MS Online cmdlets.

Run PowerShell as Administrator, then issue the following command:

get-msoluser -all | set-msoluser -passwordneverexpires $true

This command will get all users and set their PasswordNeverExpires property to true. Note that if you have many users, it will take a while to run.

To set a specific user's password expiration policy, run the following (replacing the sample user name with the actual user name):

get-msoluser -SearchString "Jack Harkness" | set-msoluser -passwordneverexpires $true

If you run into any issues, please create a helpdesk ticket!

Have more questions? Submit a request

Comments

Powered by Zendesk