
You can set Office 365 password guidelines for administrators as well as users. Set-MsolUser -UserPrincipalName alias -PasswordNeverExpires $true Office 365 Password Guidelines To set a password never expire in office 365 for a single user run the below command.

To set password never expire for all the users in your organization in office 365, run the below command. One installed successfully, to connect to MSOnline, run the below command. If you have not installed MSOnline, run the below command to install MSOnline. We can also use MSOnline module to set password never expire in office 365 for a single user or for all the users in the organization. To set the password never expire in office 365 for all users in your organization, run the below command: Get-AzureADUser -All $true | Set-AzureADUser -PasswordPolicies DisablePasswordExpiration To set the password never expire in office 365 for single user, run the below command: Set-AzureADUser -ObjectId -PasswordPolicies DisablePasswordExpirationĮxample: Set-AzureADUser -ObjectId -PasswordPolicies DisablePasswordExpiration Once installed successfully, run the below command to connect to Azure AD. If you have not installed Azure AD cmdlets, then run the below command: Install-Module AzureAD We can use Microsoft Azure AD Module for Windows PowerShell to set a password never expire in office 365 for a single user.
#OFFICE 365 PASSWORD RESET URL CUSTOM HOW TO#
Now, we will see how to set office 365 password policy using PowerShell.

O365 password policy How to Set Office 365 Password Policy using PowerShell
