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. 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
0 Comments
Leave a Reply. |