Skip to content

Get-ADUserAccountControl

SYNOPSIS

Decodes the UserAccountControl attribute of an Active Directory user.

SYNTAX

Get-ADUserAccountControl [-UserAccountControl] <Int32> [<CommonParameters>]

DESCRIPTION

The `Get-ADUserAccountControl` function decodes the UserAccountControl attribute of an Active Directory user into its corresponding flags. It provides a human-readable list of account control settings, such as whether the account is disabled, locked out, or requires a smart card.

EXAMPLES

EXAMPLE 1

Get-ADUserAccountControl -UserAccountControl 512

Decodes the UserAccountControl value `512` and returns the corresponding flags, such as `NORMAL_ACCOUNT`.

EXAMPLE 2

Get-ADUserAccountControl -UserAccountControl 514

Decodes the UserAccountControl value `514` and returns the corresponding flags, such as `NORMAL_ACCOUNT` and `ACCOUNTDISABLE`.

PARAMETERS

-UserAccountControl

The integer value of the UserAccountControl attribute to decode.

Type: Int32
Parameter Sets: (All)
Aliases:

Required: True
Position: 1
Default value: 0
Accept pipeline input: True (ByPropertyName)
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

NOTES