A. Install the Windows Azure Active Directory Module for Windows PowerShell.
1.Review software requirements and install the necessary software.
2.Install the Windows Azure Active Directory Module for Windows PowerShell.
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.
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