O365 (Exchange Online) – Disable Password Expiry
Run the following powershell
- Connect to Windows PowerShell using your company administrator credentials.
$msolcred = get-credential
connect-msolservice -credential $msolcred
- Do one of the following:
- To set the password of one user to never expire, run the following cmdlet by using the user principal name (UPN) or the user ID of the user:
Set-MsolUser -UserPrincipalName test@tsls.co.uk -PasswordNeverExpires $true
- To set the passwords of all the users in an organization to never expire, run the following cmdlet:
Get-MSOLUser | Set-MsolUser -PasswordNeverExpires $true
Confirm this has been set:
Get-MSOLUser | fl UserPrincipalName, PasswordNeverExpires
get-msoluser | ft UserPrincipalName,PasswordNeverExpires
Requires:
Office Sign-In Assistant: http://www.microsoft.com/en-us/download/details.aspx?id=41950
Azure Powershell Modules: http://go.microsoft.com/fwlink/p/?linkid=236297