Office 365 – Password Policy

Problem:

You set the password expiration policy for everyone to “never expire” but the passwords still expire.

Solution:

(h/t Natalie R.)

Connect to Office 365 and check the password policy status:
Connect-MsolService
Get-MsolUser | Sort-Object DisplayName | ft DisplayName, PasswordNeverExpires

Change the password policy status:
Get-MsolUser –UserPrincipalName <username> | Set-MsolUser –PasswordNeverExpires $True