Preventing Office 365 Passwords Expiring – stopping users pulling their hair out

Let’s get these two caveats out of the way…

1) Yes, password expiry is a good idea. But it can be a pain in the backside for most users, especially when Office 365 isn’t particularly good at warning you and if you don’t use the web client. Besides, we encourage our users to set their email passwords to something different than everything else.

2) If you’re really bothered, use Google Apps and 2-step verification!

So, you want to set your Office 365 passwords so they don’t expire?

Nerd Alert!There isn’t an easy way to do this on the web client. Like many things, we have to go down the yucky PowerShell route. So, assuming you haven’t used PowerShell with Office 365, you will need the following:

1) Download and install the Microsoft Online Services Sign-In Assistant for IT Professionals

2) Download and install the Microsoft Online Services Module (step 2)

3) Fire up PowerShell on your PC

You will need to paste in the following commands:

$cred=Get-Credential

connect-MSOLService -credential $cred

Get-MSOLUser | Set-MSOlUser -PasswordNeverExpires $true

The first line asks for your Office 365 (admin account, please!) username and password.

Line 2 connects to Office 365

Line 3 sets each user to a non-expiring password.

Bear in mind that you will have to do this each time you add new users. What a pain, eh?

 

deargeek
Follow me
Latest posts by deargeek (see all)

Copyright © 2008-2026 Jonathan Gwyer
Web Design by fairly marvellous Kent

Preventing Office 365 Passwords Expiring – stopping users pulling their hair out

by deargeek time to read: 1 min
0