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 |