How To Set a User’s Password To Never Expire Office 365

In this article, I’ll show you how set an Administrator account password to never expire using the Office 365 PowerShell module.

In past, I’ve shown how to set the password not to expire using the new Office 365 PowerShell module (also known as V2).

However, currently, most organization are using version 1 of the module because V2 is not fully functional and doesn’t contain all the Office 365 cmdlet.

Connect to Office 365

Before we can set the password to never expire, we need to log in to Office 365 using PowerShell.

I’ll connect to Office 365 using a Global Administrator account

Connect-msolnline

Once connected, I’ll use the cmdlet below to set an account called Admin to have is password never expire.

Set-MsolUser -UserPrincipalName admin@name.onmicrosoft.com -PasswordNeverExpires $true

To check if the cmdlet worked the password never expire option is enabled I’ll use the cmdlet below.

Get-MSOLUser -UserPrincipalName name@name.onmicrosoft.com | Select PasswordNeverExpires | ft -AutoSize

One Reply to “How To Set a User’s Password To Never Expire Office 365”

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.