Set Azure AD password expiry with PowerShell

Configure the Azure AD password policy using PowerShell.

John Savill

April 7, 2015

1 Min Read
Set Azure AD password expiry with PowerShell

Q. How can I set the Azure AD password expiry policy for a domain?

A. The MS Online PowerShell module can be used to modify the password policy for an Azure AD domain. There are two parameters:

  • Validity Period - Number of days the password is valid for

  • Notification Days - Number of days before expiry users start being notified

This can be configured as follows:

Set-MsolPasswordPolicy -DomainName savilltech.net -ValidityPeriod 1000 -NotificationDays 30

The policy can be viewed with:

Get-MsolPasswordPolicy -DomainName savilltech.net| fl

 

About the Author

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like