Get-​Msol​Password​Policy

Gets the current password policy for a tenant or a domain.

Syntax

Get-MsolPasswordPolicy
   -DomainName <String>
   [-TenantId <Guid>]
   [<CommonParameters>]

Description

The Get-MsolPasswordPolicy cmdlet gets the values associated with the Password Expiry window or Password Expiry Notification window for a tenant or specified domain. If you specify a domain name, it must be a verified domain for the company.

Examples

Example 1: Get the password policy for the tenant

PS C:\> Get-MsolPasswordPolicy

This command gets the password policy for the tenant.

Example 2: Get the password policy for a domain

PS C:\> Get-MsolPasswordPolicy -DomainName contoso.com

This command gets the password policy for the domain contoso.com.

Required Parameters

-DomainName

Specifies the fully qualified domain name of the domain to be retrieved.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False

Optional Parameters

-TenantId

Specifies the unique ID of the tenant on which to perform the operation. The default value is the tenant of the current user. This parameter applies only to partner users.

Type:Guid
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False

Outputs