Technical Reference: How to set Office 365 passwords to never expire

Windows 8 needs a newer version of the sign-on assistant.


1.       Install Microsoft Online Services Sign-In Assistant for IT Professionals BETA

(reboot required)

2.       Install Windows Azure Active Directory Module for Windows PowerShell (64-bit version)

3.       Paste these commands into the PowerShell window:

Import-Module msonline
$cred = Get-Credential
Connect-MsolService -cred $cred
Get-Command –Module msonline

(You will get a pop-up to supply Office 365 user credentials with Admin rights for the account)

4.       Run this command to set all users to not have passwords expire:

Get-MSOLUser | Set-MsolUser -PasswordNeverExpires $true


That’s it!


To check All users current settings:

Get-MSOLUser | Select UserPrincipalName, PasswordNeverExpires

To check a specific user setting:

Get-MSOLUser -UserPrincipalName <Microsoft Online Services ID> | Select PasswordNeverExpires

Example: Get-MSOLUser -UserPrincipalName | Select PasswordNeverExpires


Reference Pages:


This article viewed 17757 times as of 04/17/2024 --- First published on 09/10/2013 --- Last modified on 09/10/2013

<< Back to Articles

Note: Some of our articles were originally published several years ago. There may be errors or newer information. If you find an error, please use the Contact page to let us know. We create these articles as a public benefit to our fellow IT Support and network administration professionals.