Skip to content

Test AccountRequirePassword

dscbot edited this page Feb 13, 2024 · 2 revisions

Test-AccountRequirePassword

SYNOPSIS

Returns whether the specified account require a password to be provided.

SYNTAX

Test-AccountRequirePassword [-Name] <String> [<CommonParameters>]

DESCRIPTION

Returns whether the specified account require a password to be provided. If the account is a (global) managed service account, virtual account, or a built-in account then there is no need to provide a password.

EXAMPLES

EXAMPLE 1

Test-AccountRequirePassword -Name 'DOMAIN\MyMSA$'

Returns $false as a manged service account does not need a password.

EXAMPLE 2

Test-AccountRequirePassword -Name 'DOMAIN\MySqlUser'

Returns $true as a user account need a password.

EXAMPLE 3

Test-AccountRequirePassword -Name 'NT SERVICE\MSSQL$PAYROLL'

Returns $falseas a virtual account does not need a password.

PARAMETERS

-Name

Credential name for the account.

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

OUTPUTS

[System.Boolean]

NOTES

RELATED LINKS

Clone this wiki locally