Export (0) Print
Expand All
Expand Minimize
0 out of 1 rated this helpful - Rate this topic

Set-MsolPasswordPolicy

Published: April 18, 2013

Updated: January 21, 2014

Applies To: Office 365, Windows Azure, Windows Intune

noteNote
  • This topic provides online help content for cloud services, such as Windows Intune and Office 365, which rely on Windows Azure Active Directory for identity and directory services.

  • The Windows Azure Active Directory Module for Windows PowerShell cmdlets were previously known as the Microsoft Online Services Module for Windows PowerShell cmdlets.

The Set-MsolPasswordPolicy cmdlet can be used to update the password policy of a specified domain or tenant. Two settings are required, the first is to indicate the length of time that a password remains valid before it must be changed and the second is to indicate the number of days before the password expiration date that will trigger when users will receive their first notification that their password will soon expire.

Set-MsolPasswordPolicy -DomainName <string> -NotificationDays <int> -ValidityPeriod <int> [<CommonParameters>]
    -DomainName <string>
        The fully qualified domain to apply policies to.
        
        Required?                    true
        Position?                    named
        Default value                
        Accept pipeline input?       true (ByPropertyName)
        Accept wildcard characters?  false
        
    -NotificationDays <int>
        Specifies the number of days before the password expiration date that 
        will trigger when users will receive their first notification that 
        their password will soon expire.
        
        Required?                    true
        Position?                    named
        Default value                
        Accept pipeline input?       false
        Accept wildcard characters?  false
        
    -ValidityPeriod <int>
        Specifies the length of time that a password is valid before it must 
        be changed.
        
        Required?                    true
        Position?                    named
        Default value                
        Accept pipeline input?       false
        Accept wildcard characters?  false
        
    <CommonParameters>
        This cmdlet supports the common parameters: Verbose, Debug,
        ErrorAction, ErrorVariable, WarningAction, WarningVariable,
        OutBuffer, PipelineVariable, and OutVariable. For more information, 
    see 
        about_CommonParameters 
    (http://go.microsoft.com/fwlink/?LinkID=113216).

The following examples demonstrate the usage of the cmdlet.

The following command updates the tenant so that all users passwords will expire after 60 days and that the users will receive notification of 14 days prior to that expiry.

Set-MsolPasswordPolicy -ValidityPeriod 60 -NotificationDays 14

The following command updates the policy on the domain contoso.com so that users passwords will expire after 60 days and that the users will receive notification of 14 days prior to that expiry.

Set-MsolPasswordPolicy -ValidityPeriod 60 -NotificationDays 14 -DomainName contoso.com

See Also

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.