편집

다음을 통해 공유


Get-EntraPasswordPolicy

Retrieves the current password policy for the tenant or the specified domain.

Syntax

Get-EntraPasswordPolicy
 []
Get-EntraPasswordPolicy
   -DomainName <String>
   [<CommonParameters>]

Description

The Get-EntraPasswordPolicy cmdlet can be used to retrieve the values associated with the Password Expiry window or Password Expiry Notification window for a tenant or specified domain.

When a domain name is specified, it must be a verified domain for the company.

In delegated scenarios, the signed-in user must have either a supported Microsoft Entra role or a custom role with the necessary permissions. The minimum roles required for this operation are:

  • Domain Name Administrator

Examples

Example 1: Get password policy for a specified domain

Connect-Entra -Scopes 'Domain.Read.All'
Get-EntraPasswordPolicy -DomainName 'contoso.com'

NotificationDays ValidityPeriod
---------------- --------------
            90             180

Returns the password policy for the specified domain.

  • -DomainName parameter specifies the fully qualified domain name to retrieve.

Parameters

-DomainName

The fully qualified name of the domain to be retrieved.

Type:System.String
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False