Office 365 Disable Password Expiration / Stop Passwords from Expiring

Discussion in 'Windows Guides' started by InsaneNutter, Apr 15, 2014.

  1. InsaneNutter

    InsaneNutter Resident Nutter Staff Member

    Jun 1, 2007
    Likes Received:
    Yorkshire, England
    Why would you want to do disable Password Expiration for Office 365 for Office 365 users? Surly its more secure to have users change passwords every 90 days?


    Yes that’s true, however if you have Office 365 synced with Active Directory on your domain chances are you have a password policy set-up anyway, so when the user changes their domain password it will sync to Office 365.

    To disable Disable Password Expiration for Office 365 you need to install the following:

    For both of the above Download the 32bit or 64bit version, depending on the operating system your using.

    When installed you should now have a “Windows Azure Active Directory Module for Windows PowerShell” either in your start menu / screen, or as a shortcut on the desktop. This is what you want to use to disable password expiration in Office 365, not the standard Windows Powershell.


    When you have loaded up the Windows Azure Active Directory Module for Windows PowerShell simply type the following:

    connect-MSOLService -credential $cred
    You will then be asked to type in the credentials of an Office 365 administrator account:


    Once you are authenticated simply type:

    Get-MSOLUser | Set-MsolUser -PasswordNeverExpires $true


    This will turn off password expiration for all of your Office 365 accounts, you should not be required to do this for any new accounts created at a later date.

    How can i check this has worked?

    To view all the user accounts on your Office 365 subscription, along with if the users password is set to expire or not, run the following command:

    Get-MSOLUser | Select UserPrincipalName, PasswordNeverExpires

    It is also possible to check the password expiration status for individual accounts with the following command:

    Get-MSOLUser -UserPrincipalName | Select PasswordNeverExpires

    Note: After doing this if you have any passwords that are bugging you about expiring soon you might have to change them to stop the notifications, however after that you should not be bothered any more.
    Rick likes this.

Share This Page