Set Office 365 Passwords to Never Expire

By default, office 365 passwords are set to expire after a certain period of time. This can be exasperating, especially in large organizations or in situations when people never use outlook web access (which is where the password expiration notices and resets take place). Luckily, it is easy enough to manage this for individual users or entire organizations using powershell commands.

First, make sure you have powershell downloaded, installed, and signed into your organization. For instructions on these basics, refer to this earlier post:

http://www.office365forbiz.com/the-basics-of-office-365-powershell/

 

First you can check individual users or your organization to see if the password is set to expire. To check your entire organization, run this command:

Get-MSOLUser | Select UserPrincipalName, PasswordNeverExpires

If you want to check an individual user, run this command:

Get-MSOLUser -UserPrincipalName exampleuser@organization.com | Select PasswordNeverExpires

 

Unless you or someone else has already set them to never expire, chances are they are going to be set to expire at some point. Here is the command to set your entire organization to never expire:

Get-MSOLUser | Set-MsolUser -PasswordNeverExpires $true

If you wan to set only an individual user to never expire, run this command:

Set-MsolUser -UserPrincipalName exampleuser@organization.com -PasswordNeverExpires $true

 

As you could probably guess, the commands to set the entire organization or an individual user back to expire are pretty similar. To set an organization to expire:

Get-MSOLUser | Set-MsolUser -PasswordNeverExpires $false

If you wan to set only an individual user to expire, run this command:

Set-MsolUser -UserPrincipalName exampleuser@organization.com -PasswordNeverExpires $false

Subscribe

Subscribe to our e-mail newsletter to receive updates.

Trackbacks/Pingbacks

  1. Two Ways to Reset Office 365 Passwords -Office 365 for Business - February 7, 2013

    […] Lastly, if you would like to set your user passwords to never expire, here is an article explaining that procedure. […]

Leave a Reply

* Copy This Password *

* Type Or Paste Password Here *