In Order to Set Passwords to Never Expire…
Download and install the Microsoft Online Services Sign-In Assistant for IT Professionals Beta from https://www.microsoft.com/en-my/download/details.aspx?id=39267 you will need to restart your computer after the install.
Then download and install the Windows Azure Active Directory Module for Windows Powershell version that matches your computer processor (32 or 64 bit) from https://technet.microsoft.com/library/jj151815.aspx
Right click the Windows Azure AD Module for windows PowerShell and run as an administrator
At the command prompt run these three commands.
After running the first command you will need to provide office 365 global administrator credentials to sign in.
connect-MSOLService -credential $cred
After you run the second command it looks like this:
To set the passwords of all the users in an organization to never expire, run the following cmdlet: Get-MSOLUser | Set-MsolUser -PasswordNeverExpires $true
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 <user ID> -PasswordNeverExpires $true
To see if the password expiration is disabled run these commands:
To see whether a single user’s password is set to never expire, run the following cmdlet by using the user principal name (UPN) (for example, firstname.lastname@example.org) or the user ID of the user you want to check: Get-MSOLUser -UserPrincipalName <user ID> | Select PasswordNeverExpires
To see the “Password never expires” setting for all users, run the following cmdlet: Get-MSOLUser | Select UserPrincipalName, PasswordNeverExpires
No comment yet, add your voice below!