A. Install the Windows Azure Active Directory Module for Windows PowerShell.
1.Review software requirements and install the necessary software.
http://technet.microsoft.com/en-us/library/jj151815.aspx#BKMK_Requirements
2.Install the Windows Azure Active Directory Module for Windows PowerShell.
http://technet.microsoft.com/en-us/library/jj151815.aspx#bkmk_installmodule
B. Set the passwords to never expire for all the users in an organization.
When using the commands in PowerShell, please just copy the commands and then paste them by right clicking the PowerShell Interface.
Step1. Run the following command to connect Microsoft online service and enter credentials with the Office 365 admin account.
Connect-msolservice
Step2. Run the following command to set the passwords to never expire for all the users in the organization:
Get-MSOLUser | Set-MsolUser -PasswordNeverExpires $true
Step3. Run the following command to check if the "Password never expires" setting for all users is correct,
Get-MSOLUser | Select UserPrincipalName, PasswordNeverExpires