Add User Account Information to Active Directory Users and Computers in Windows 2008 R2

Posted: January 22, 2012 in Windows

This Default view from Active Directory Users and Computers

clip_image002

1. Open notepad, type text below and save with *.VBS (USER_LOGON_INFO.VBS) save to location DCW2K8-01netlogon \\yourdomaincontroller\netlogon or C:\Windows\SYSVOL\sysvol\domaincontroller\scripts

On Error Resume Next

Set wshArguments = WScript.Arguments

Set objUser = GetObject(wshArguments(0))

str1 = “Last Login: ” & objUser.LastLogin

str2 = “Last Logoff: ” & objUser.LastLogoff

str3 = “Last Failed Login: ” & objUser.LastFailedLogin

str4 = “Logon Count: ” & objUser.logonCount

str5 = “Bad Login Count: ” & objUser.BadLoginCount

str6 = “Password Last Changed: ” & objUser.PasswordLastChanged

str7 = “User Account Control: ” & objUser.userAccountControl

str8 = “Login Script: ” & objUser.scriptPath

str9 = “Account Created: ” & objUser.whenCreated

str10 = “Account Last Modified: ” & objUser.whenChanged

MsgBox str1 & vbCrLf & str2 & vbCrLf & str3 & vbCrLf & str4 & vbCrLf & str5 & vbCrLf & str6 & vbCrLf & str7 & vbCrLf & str8 & vbCrLf & str9 & vbCrLf & str10,,objUser.Name

2. Open ADSIEdit.MSC (if you use windows server 2003 cannot open ADSIEdit.MSC, you must install Support Tools from CD installation windows server 2003 )

clip_image004

3. Right-click from ADSI Edit connect to > Select a well know Naming Context : Configuration.

clip_image006

4. Navigate to the following path : CN=Configuration,DC=DZIKRA,DC=LOCAL > CN=DisplaySpecifiers > CN=409. Select CN=user-Display Right-click Properties.

clip_image008

5. Select adminContextMenu and Add 2, &Show Logon Info, \\yourdomaincontroller\netlogon USER_LOGON_INFO.VBS

clip_image010

6. When done close ADSI Edit and open Active Directory Users and Computers

7. Select user and Right-click, you can see Show Logon Info (Select this)

clip_image012

clip_image014

clip_image015

Comments
  1. Hello there, just became alert to your blog through Google, and
    found that it is truly informative. I am gonna watch out for brussels.

    I will appreciate if you continue this in future. Numerous people will be benefited
    from your writing. Cheers!

  2. I am regular reader, how are you everybody? This piece of writing posted at this site is truly
    pleasant.

Leave a Reply

Your email address will not be published. Required fields are marked *