Active Directory userAccountControl (UAC) Values

In Active Directory, every user and computer object has an attribute called userAccountControl (UAC). This attribute stores the sum of a set of bit flags that define the account’s state and behavior: whether the account is enabled, whether its password expires, whether it requires a smartcard, and so on — all of these settings are encoded into a single integer value.

The value is read using bitwise logic. For example, the “password never expires” flag (DONT_EXPIRE_PASSWORD = 65536) combined with “enabled normal account” (NORMAL_ACCOUNT = 512) produces 512 + 65536 = 66048. For this reason, when searching for accounts with a specific setting you use bit masking (-band) rather than equality.

Example: To find users configured so their password never expires, you can use the following PowerShell command.

Get-ADUser -Filter "useraccountcontrol -band 65536" -Properties userAccountControl |
    Select-Object Name, SamAccountName, userAccountControl

The -band 65536 expression returns every account with the DONT_EXPIRE_PASSWORD bit set, regardless of whether the account is enabled/disabled or carries other flags.


Default Values

Object TypeDecimal ValueHex
Standard user (enabled, normal account)5120x200
Workstation / member server40960x1000
Domain Controller5324800x82000

Common Combined Values

The following table lists frequently encountered flag combinations and the account states they represent.

ValueDescription
512Enabled Account
514Disabled Account
544Enabled, Password Not Required
546Disabled, Password Not Required
66048Enabled, Password Doesn’t Expire
66050Disabled, Password Doesn’t Expire
66080Enabled, Password Doesn’t Expire & Not Required
66082Disabled, Password Doesn’t Expire & Not Required
262656Enabled, Smartcard Required
262658Disabled, Smartcard Required
262688Enabled, Smartcard Required, Password Not Required
262690Disabled, Smartcard Required, Password Not Required
328192Enabled, Smartcard Required, Password Doesn’t Expire
328194Disabled, Smartcard Required, Password Doesn’t Expire
328224Enabled, Smartcard Required, Password Doesn’t Expire & Not Required
328226Disabled, Smartcard Required, Password Doesn’t Expire & Not Required

Individual Property Flags

Each flag represents a single bit. An account’s userAccountControl value is the sum of the individual values below.

Property FlagHexDecimal
SCRIPT0x00011
ACCOUNTDISABLE0x00022
HOMEDIR_REQUIRED0x00088
LOCKOUT0x001016
PASSWD_NOTREQD0x002032
PASSWD_CANT_CHANGE0x004064
ENCRYPTED_TEXT_PWD_ALLOWED0x0080128
TEMP_DUPLICATE_ACCOUNT0x0100256
NORMAL_ACCOUNT0x0200512
INTERDOMAIN_TRUST_ACCOUNT0x08002048
WORKSTATION_TRUST_ACCOUNT0x10004096
SERVER_TRUST_ACCOUNT0x20008192
DONT_EXPIRE_PASSWORD0x1000065536
MNS_LOGON_ACCOUNT0x20000131072
SMARTCARD_REQUIRED0x40000262144
TRUSTED_FOR_DELEGATION0x80000524288
NOT_DELEGATED0x1000001048576
USE_DES_KEY_ONLY0x2000002097152
DONT_REQ_PREAUTH0x4000004194304
PASSWORD_EXPIRED0x8000008388608
TRUSTED_TO_AUTH_FOR_DELEGATION0x100000016777216
PARTIAL_SECRETS_ACCOUNT0x0400000067108864

Source

The flag names and values are based on Microsoft’s official documentation: How to use the UserAccountControl flags to manipulate user account properties.