The default policy for Office 365 user accounts is to automatically expire their passwords after 90 days.
Some of our users experienced this today and the most annoying thing about it was that they were not warned beforehand about it. They were simply locked out their account until they changed it there and then; unlike the Windows OS counterpart which gives you a comfortable 15 day warning before forcing you to change your password.
Anyway, this article will tell you how to set the password expiry from 90 days to never.
Office 365 already enforces a strong password policy BUT I do not recommend you change this setting if your users often use public terminals or are prone to writing their passwords on sticky notes and keeping them under their keyboards 🙂
- First you need to download the AdministrationConfig.msi from Microsoft. This is not the same as PowerShell. The MSO config shell is used mainly for administrative purposes. You can download it here.
- Enter the commands below:
$Creds = Get-Credential
Connect-MsolService –Credential $Creds
$LiveCred = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange-ConnectionUri https://ps.outlook.com/powershell/ -Credential $LiveCred -Authentication Basic -AllowRedirection
Get-MSOLUser | Set-MSOLUser –PasswordNeverExpires $true
The last command is the one which sets the ‘PasswordNeverExpires’ attribute to true for all your users.