Solving IT Problems Everyday - Since 2002
Solving Tech Issues for New Jersey - Since 2002
Doing Geek Stuff for Non-Geeks - Since 2002
Providing IT Support to Businesses for Over 20 Years
Looking to Upgrade Your "Computer Guy"? Call Us.

Call or Text

How To Set an Office365 Account Password to Never Expire

By default, the passwords for Office365 accounts are set to expire after 90 days. In some situation that may interfere with other applications that sends email with that account. In order to set them to never expire, the PasswordPolicies setting needs to be changed.

You can however turn off password expiration or change the days before expiration in Office365 via powershell commands.

MSOline Module

If you don’t have MSOline module installed, open PowerShell using Run as Administrator and use this to install:

					Install-Module MSOnline

To connect to it, use this cmdlet, entering your administrator username and password when asked.


To list all users and see their password expiration setting, use this cmdlet:

					Get-MSOLUser | Select UserPrincipalName, PasswordNeverExpires

Check Password Settings

To check the PasswordNeverExpires for just one user, use this command, replacing alias with the user’s alias.

					Get-MSOLUser -UserPrincipalName alias | Select PasswordNeverExpires

Set passwords to never expire

Use this command to set all user’s passwords to never expire.

					Get-MSOLUser  | Set-MSOLUser –PasswordNeverExpires $true

To change a single user, use the following command, replacing alias with the user’s alias.

					Set-MsolUser -UserPrincipalName alias -PasswordNeverExpires $true

To change the passwords to expire, run the cmdlet above but use $false instead of $true.


Leave a Reply

Your email address will not be published. Required fields are marked *

Leave a Reply

Your email address will not be published. Required fields are marked *