< Back

Get-ADUserAccountControl

Fri Jan 10, 2020 7:04 pm

NAME Get-ADUserAccountControl



SYNOPSIS

Gets an enumeration of a user's UserAccountControl attribute.





SYNTAX

Get-ADUserAccountControl [-Identity] <String> [[-Domain] <String>] [-Credential <PSCredential>]

[<CommonParameters>]





DESCRIPTION

The Get-ADUserAccountControl cmdlet gets the value from a user's UserAccountControl attribute and enumerates it to

the different parts that create the bitwise value.





PARAMETERS

-Identity <String>

The identity of the object, can be a SamAccountName, DistinguishedName, Name, Display Name, CN, ObjectSID,

ObjectGUID or DisplayName property.



Required? true

Position? 1

Default value

Accept pipeline input? true (ByValue, ByPropertyName)

Accept wildcard characters? false



-Domain <String>

Optionally indicates the domain the object exists in. If this parameter is not specified, the domain of the

local user or computer is used, depending on what is specified for

the Identity parameter. If the identity parameter is specified, the current user domain is used. If the

identity parameter is not specified, and the current windows identity is

the system account, the local computer domain is used, otherwise the current user domain is used.



If the Identity parameter is specified with a domain\\username or UPN value, this parameter is ignored.



Required? false

Position? 2

Default value [System.String]::Empty

Accept pipeline input? false

Accept wildcard characters? false



-Credential <PSCredential>

Specifies a user account that has permission to perform this action. The default is the current user.



Type a user name, such as "User01" or "Domain01\\User01", or enter a PSCredential object, such as one generated

by the Get-Credential cmdlet. If you type a user name, you will be prompted for a password.



Required? false

Position? named

Default value [System.Management.Automation.PSCredential]::Empty

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

System.String





OUTPUTS

System.Management.Automation.PSCustomObject[]





NOTES





AUTHOR: Michael Haken

LAST UPDATE: 1/7/2017



-------------------------- EXAMPLE 1 --------------------------



PS C:\\>Get-ADUserAccountControl -Identity "John Smith"



Gets the UAC enumeration for John Smith.











RELATED LINKS