Export (0) Print
Expand All
0 out of 5 rated this helpful - Rate this topic

Configure user passwords to never expire

Published: April 16, 2012

Updated: February 27, 2014

Applies To: Office 365, Windows Azure, Windows Intune

noteNote
This topic provides online help content for cloud services, such as Windows Intune and Office 365, which rely on Windows Azure Active Directory for identity and directory services.

As a global administrator for a Microsoft cloud service, you can use the Windows Azure Active Directory Module for Windows PowerShell to set up user passwords to never expire. You can also use Windows PowerShell cmdlets to remove the never-expires configuration, or to see which user passwords are set up to never expire.

noteNote
Only passwords for user accounts that are not synchronized through directory synchronization can be configured to never expire. For more information about directory synchronization, see the list of topics in Directory synchronization roadmap.

To use Windows PowerShell cmdlets, you first must install them.

  1. Connect to Windows PowerShell using your company administrator credentials.

  2. Do one of the following:

    • 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, aprilr@contoso.onmicrosoft.com) 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

  1. Connect to Windows PowerShell using your company administrator credentials.

  2. Do one of the following:

    • 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 set the passwords of all the users in an organization to never expire, run the following cmdlet:

      Get-MSOLUser | Set-MsolUser -PasswordNeverExpires $true

  1. Connect to Windows PowerShell using your company administrator credentials.

  2. Do one of the following:

    • To set the password of one user so that the password does 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 $false

    • To set the passwords of all users in the organization so that they do expire, use the following cmdlet:

      Get-MSOLUser | Set-MsolUser -PasswordNeverExpires $false

See Also

Other Resources

Reset a user's password

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.