X

How to Set an Individual Password to Never Expire in Office 365

If you want to set a password to never expire for a single user, you have to do it via PowerShell. There is no way from admin center.

Prerequisites

Download and install the following modules.

  1. Microsoft Online Service Sign-in Assistant for IT Professionals RTW
  2. Windows Azure Active Directory Module for Windows PowerShell (64-bit version)

Step-By-Step

-Open PowerShell with elevated privileges.

-Execute the following command. When you are prompted, enter your O365 global admin account or an account having required privileges.

$credential = Get-Credential

-Execute the following command to connect to O365.

Connect-MsolService -Credential $credential

-Execute the following command to set an individual user to never to expire.

Set-MsolUser -UserPrincipalName <name of the account> -PasswordNeverExpires $true

For example, to set the password to never expire for a user 'John Powell', Issue the following command.

Set-MsolUser -UserPrincipalName jpowell@thewinadmins.com -PasswordNeverExpires $true

Categories: O365 PowerShell
Karim Buzdar: About the Author: Karim Buzdar holds a degree in telecommunication engineering and holds several sysadmin certifications. As an IT engineer and technical author, he writes for various websites.
X

Headline

You can control the ways in which we improve and personalize your experience. Please choose whether you wish to allow the following:

Privacy Settings