Set Office 365 Administrator Password To Never Expire

In this article I’ll show you how set my Office 365 Administrator password to never expire.

The reason I’m doing this Is because I’m running many scripts that auto connect to Office 365 and generate reports.

Like always, before you start, Install the Windows PowerShell Module for Office 365 and connect to Office 365 using PowerShell.

First connect to Office 365 using:


To set the password to never expire run:

Set-MsolUser -UserPrincipalName -PasswordNeverExpires $true

To check If it’s working use:

Get-MSOLUser -UserPrincipalName | Select PasswordNeverExpires | ft -AutoSize