When you have loaded up the Windows Azure Active Directory Module for Windows PowerShell simply type the following:

connect-MSOLService -credential $cred

You will then be asked to type in the credentials of an Office 365 administrator account.Fill that in. Once you are authenticated simply type:

Get-MSOLUser | Set-MsolUser -PasswordNeverExpires $true

This will turn off password expiration for all of your Office 365 accounts, you should not be required to do this for any new accounts created at a later date.


How can i check this has worked?

To view all the user accounts on your Office 365 subscription, along with if the users password is set to expire or not, run the following command:

Get-MSOLUser | Select UserPrincipalName, PasswordNeverExpires

It is also possible to check the password expiration status for individual accounts with the following command:

Get-MSOLUser -UserPrincipalName user@domain.com | Select PasswordNeverExpires