| Active Directory UserAccountControl Attribute |
|
|
| Written by Praveen | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Thursday, 23 December 2010 12:27 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
On a day to day work, some or the other time you must have come across the situation where you want to extract the reports like the list of disabled users from Active directory, the list of Active mailbox users in your exchange server etc. Most of us will search for some automated tool to extract the reports. But you do not need any such scripts to extract these reports; the CSVDE command will help you in getting the report. For e.g. you need the report of all enabled user accounts in your domain, use the below command. Open command prompt and execute it(note – modify the command with your domain details). CSVDE -r "(objectClass=user)" -d "dc=ExchangeDictionary,DC=com" -s ExchDicDC01.ExchangeDictionary.com -l displayname,useraccountcontrol -f c:\UserList.csv -r :- this place we will give the filter, here I have given the objectClass=user, so the command will only run against the user objects. -d :- scoping the command, here I have scoped to the entire domain(dc=ExchangeDictionary,DC=com means the domain ExchangeDictionary.com ). If you want to execute against one OU, you can still do it. Replace this with Ou=”your OU Name”, dc=ExchangeDictionary,DC=com -s :- specifies the domain controller to which the command to run.
-l :- the list of attribute that needs to be extracted for each matching active directory object. -f :- the output file. Once you have succefully run the above command, open the output file in excel. Now you may verify the useraccountcontrol value against the below list and filter out the required report.UserAccountControl Values 512 - Enable Account 514 - Disable account 544 - Account Enabled - Require user to change password at first logon 4096 - Workstation/server 66048 - Enabled, password never expires 66050 - Disabled, password never expires 66080 – Enables, password never expires, password not required. 532480 - Domain controller 590336 – Enabled, User Cannot Change Password, Password Never Expires We can view and edit these attributes by using either the Ldp.exe tool or the Adsiedit.msc snap-in. 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, this is 514 (2 + 512).See the property tag and the corresponding value in decimal
Hope this will help you in managing your domain in some or other ways. Send me your comments on this. Ref - http://support.microsoft.com/kb/305144 -Praveen |
Read In
Popular
ARCHIVES
- ► 2013 (7)
- ► 2012 (46)
- ► 2011 (24)
- ► 2010 (31)
VISITORS






Your IP: 184.72.91.94
,
Follow Us






Comments
Thanks for sharing all the above information.
Do you know the decimal number for:
Account Enabled - Require user to change password at first logon - Password never expires
Many thanks
RSS feed for comments to this post