How to configure user passwords to never expire in Office 365
There are two main steps of how to set user passwords to never expire:
Setup Office 365 PowerShell Management Interface
The Office 365 PowerShell Management Interface offers the ability to administer service-wide features, and is not limited to a specific service like i.e. Exchange Online. The initial features that can be administered using this interface include the following:
This interface is available through a PowerShell Module available from here:
The Microsoft Online Services Sign-In Assistant 7.0 is a prerequisite for installing the Microsoft Online Services Module for Windows PowerShell, and is available from here:
When installed you can launch Windows PowerShell and perform the following steps:
$cred = Get-Credential
Connect-MsolService -cred $cred
Get-Command –Module msonline
1) Import the module.
2) Create a credential-object stored in the variable $credimp
3) Create a new remote PowerShell connection against the PowerShell endpoint for Office 365
4) List the cmdlets available
A shortcut to the module is also available on the Start-menu (you can skip step 1 if launching this shortcut):
Here is an overview of the available cmdlets:
Run command in Office 365 PowerShell Management Interface
For users who are not synchronized through directory synchronization
In Office 365, customers can use the Microsoft Online Services Module for Windows PowerShell (MOSMWP) to configure their user passwords to never expire. The following steps can be provided to customers who want to configure these settings for their users.
How to check if the "Password never expires" setting is enabled or disabled for a user
Get-MSOLUser -UserPrincipalName <Microsoft Online Services ID> | Select PasswordNeverExpires
Alternatively, to see all users and their "Password never expires setting", you can run the following PowerShell command:
Get-MSOLUser | Select UserPrincipalName, PasswordNeverExpires
How to enable the "Password never expires" setting
Set-MsolUser -UserPrincipalName <Microsoft Online Services ID> -PasswordNeverExpires $true
Note If you want to change the setting for all the users in an organization, run the following command:
Get-MSOLUser | Set-MsolUser -PasswordNeverExpires $true
How to disable the "Password never expires" setting
Set-MsolUser -UserPrincipalName <Microsoft Online Services ID> -PasswordNeverExpires $false
Note If you want to change the setting for all the users in an organization, use the following cmdlet:
Get-MSOLUser | Set-MsolUser -PasswordNeverExpires $false
For users who are synchronized through directory synchronization
The PasswordNeverExpires setting for synchronized users must be configured by using the steps earlier in this article. There is no Active Directory property that can be synchronized to Office 365 to set the PasswordNeverExpires setting.
For more information
Um, Easier way? Or do I need to just go to linux if I wanna be a freakin CLI geek?
As of June 2013, this process no longer works. The "microsoft online services module", above, will download but not install.
Actually, the process still works fine as given 6-20-13. Follow the steps exactly. I launched the Microsoft Online Services Module for PowerShell, and then input the commands there.
"Connect to the Microsoft Online Services Module for Windows PowerShell by using your company administrator credentials" Can't bother yourself to mention how to do this?
as of 25-Aug 2013, the steps above still works...
only i find that the link download for the above "Microsoft Online Services Sign-In Assistant 64-bit" has some issues to Launch the PS.
instead i got from another link download below for => Microsoft Online Services Sign-In Assistant for IT Professionals BETA