Hướng dẫn dùng 512 128 trong PHP
Skip to main content Show This browser is no longer supported. Nội dung chính
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support. Use the UserAccountControl flags to manipulate user account properties
In this articleThis article describes information about using the UserAccountControl attribute to manipulate user account properties. Applies to: Windows Server 2012 R2 SummaryWhen you open the properties for a user account, click the Account tab, and then either select or clear the check boxes in the Account options dialog box, numerical values are assigned to the UserAccountControl attribute. The value that is assigned to the attribute tells Windows which options have been enabled. To view user accounts, click Start, point to Programs, point to Administrative Tools, and then click Active Directory Users and Computers. List of property flagsYou can view and edit these attributes by using either the Ldp.exe tool or the Adsiedit.msc snap-in. The following table lists possible flags that you can assign. You can't set some of the values on a user or computer object because these values can be set or reset only by the directory service. Ldp.exe shows the values in hexadecimal. Adsiedit.msc displays the values in decimal. The flags are cumulative. To disable a user's account, set the UserAccountControl attribute to 0x0202 (0x002 + 0x0200). In decimal, it's 514 (2 + 512). Note You can directly edit Active Directory in both Ldp.exe and Adsiedit.msc. Only experienced administrators should use these tools to edit Active Directory. Both tools are available after you install the Support tools from your original Windows installation media.
Note In a Windows Server 2003-based domain, LOCK_OUT and PASSWORD_EXPIRED have been replaced with a new attribute called ms-DS-User-Account-Control-Computed. For more information about this new attribute, see ms-DS-User-Account-Control-Computed attribute. Property flag descriptions
UserAccountControl valuesHere are the default UserAccountControl values for the certain objects:
|