by , Blog, No Comments

Apr 24

Expiring Office 365 Passwords


by JR Data, Blog, Comments Off

Apr 24

I was travelling the other day, when I suddenly stopped receiving e-mails on my Office 365 account (Plan P). This was the main administrator account, and the other accounts was not affected. I got a message on the iPhone that the account was unavailable. My first thought was that there was an error with the mail servers at Microsoft, but discarded that thought after a while. When I had a computer at hand again, I tried to log onto the Office 365 Outlook Web Access (OWA). After log in, I was prompted to change my password as it had expired.

This issue can cause quite some problems if you are on the run and don’t have a computer at hand to run the OWA. My solution to this problem was to set all accounts to not expire, by the use of Power Shell. Here is a quick how-to:

1. Install the Office 365 cmdlets (
- Microsoft Online Services Sign-In Assistant (IDCRL7)
- Microsoft Online Services Module for Windows PowerShell

2. Start application “Microsoft Online Services Module for Windows PowerShell”, found in your start menu after above installation

3. Run PowerShell command: Connect-MsOlService

4. Login with your administrator account for Office 365

To set all accounts to never expire password, run:
5. Get-MsOlUser | Set-MsOlUser -PasswordNeverExpires $True

To set individual account to never expire password, run:
5. Set-MsOlUser –UserPrincipalName UserID –PasswordNeverExpires $True

(To get the UserPrincipleName, run Get-MsOlUser)

    Comments are closed.