27. October 2012 · Comments Off on Configure user passwords to never expire on Office 365 · Categories: Office365 · Tags: , ,

Prerequisites

Microsoft Online Services Module for Windows PowerShell must be installed

http://onlinehelp.microsoft.com/en-us/office365-enterprises/hh124998.aspx

1. Install Single Sign-on
2. Install PowerShell Add-on

Procedure

Open “Microsoft Online Services Module for Windows Powershell”

Connect to the account by typing

Connect-MSOLService 
 (You will get a username and password Prompt)

[[Authenticate]]

Check whether a password is set to never expire

To check whether a password is set to never expire, determine whether the PasswordNeverExpires setting is enabled or disabled for a user. To do this run the following cmdlet by using the user principal name (UPN) or the user ID of the user whom you want to check:

Get-MSOLUser -UserPrincipalName <user ID> | Select PasswordNeverExpires

Or, to see all users and their PasswordNeverExpires setting, run the following cmdlet:
 Get-MSOLUser | Select UserPrincipalName, PasswordNeverExpires
Configure a password to never expire

To set a user’s password to never expire, enable the PasswordNeverExpires setting. To do this, run the following cmdlet by using the UPN or the user ID of the user to configure the password to never change:

Set-MsolUser -UserPrincipalName <user ID> -PasswordNeverExpires $true

If you want to change the setting for all the users in a company, run the following cmdlet:
Get-MSOLUser | Set-MsolUser -PasswordNeverExpires $true 

Source:KB2666768 

Comments closed.