Skip to content

In Order to Set Passwords to Never Expire…

Download and install the Microsoft Online Services Sign-In Assistant for IT Professionals Beta from you will need to restart your computer after the install.

Then download and install the Windows Azure Active Directory Module for Windows Powershell version that matches your computer processor (32 or 64 bit) from

Right click the Windows Azure AD Module for windows PowerShell and run as an administrator

At the command prompt run these three commands.


After running the first command you will need to provide office 365 global administrator credentials to sign in.



connect-MSOLService -credential $cred

After you run the second command it looks like this:

picture 2


To set the passwords of all the users in an organization to never expire, run the following cmdlet: Get-MSOLUser | Set-MsolUser -PasswordNeverExpires $true

To set the password of one user to never expire, run the following cmdlet by using the user principal name (UPN) or the user ID of the user: Set-MsolUser -UserPrincipalName <user ID> -PasswordNeverExpires $true


To see if the password expiration is disabled run these commands:

To see whether a single user’s password is set to never expire, run the following cmdlet by using the user principal name (UPN) (for example, or the user ID of the user you want to check: Get-MSOLUser -UserPrincipalName <user ID> | Select PasswordNeverExpires

To see the “Password never expires” setting for all users, run the following cmdlet: Get-MSOLUser | Select UserPrincipalName, PasswordNeverExpires

Related Posts

Office 365 Plan Comparison

What’s in a Plan?

Written by: Ian Smith Office 365 Plan Comparison Microsoft Office 365 is available in a variety of plans to best meet the needs of your

Read More »
multi-factor authentication

Multi-Factor Authentication

Written by: Nathan Smith Identity is the New Firewall They say in today’s environment identity is the new firewall. With that said, the importance of

Read More »

Drop us a note

Please drop us a note via the form below with your comments or questions on this blog post; or if there is anything we can help you with.