PowerShell Ezine, Logon Scripts

Guy's Scripting Ezine 84 - Acctinfo.dll

Contents for Ezine 84 - Acctinfo.dll

This week's secret

This week I have something a little different for you, not a script but a program called Acctinfo. What this simple add-on does is expose more properties for in Active Directory Users and Computers, for example lastLogon and Password Expires. 

What led me to discover this treasure called acctinfo.dll was research into an LDAP property called lastLogon.  The reason that I have not used acctinfo.dll before is that I usually call for ADSI Edit whenever I need to investigate such Active Directory attributes and values.  As far as I know, Acctinfo does not modify the schema.


If you are looking for handy network utilities, try some of the free downloads at Tools4Ever


Mission - To add Additional Account Info Property Tab.

What I want to do is add an extra tab in Active Directory Users and Computers.  Amongst the extra information on this tab is, the lastLogon time, UserAccountControl value and Bad Password Count.

As we will see next week, scripting lastLogon is fraught with problems; however, displaying the Last Logon time with Active Directory Users and Computers tab makes it easier to see what is happening.

ˆ

Download and Install Additional Account InfoAdditional Account Info acctinfo.dll

  1. Download acctinfo.dll or acctinfo in zip format
  2. Copy acctinfo.dll to the %systemroot%\system32 folder
  3. Register the service and dll with this command:
    regsvr32 acctinfo  (Similar to registering the schema snap-in)
  4. Close, then open Active Directory Users and Computers. 

Learning Points

Note 1: My information is that you need to install acctinfo on the machine where you execute the Active Directory Users and Computers snap-in.

Note 2: In line with modern best practice, once you have registered acctinfo, there is no need to reboot your server.

Note 3: If you wish to remove the Additional Account Info tab, open a run command and type:
regsvr32 /u acctinfo

Note 4: Acctinfo is supplied free by Microsoft.

Summary of Acctinfo

Download and try this cost-nothing add-on for Active Directory Users and Computers.  Acctinfo gives extra information about the last time a user logged on, also Bad Password count and the UserAccountControl value.  Download and install acctinfo.dll and get the Additional Account info tab of your users.

See Also

Windows Server 2003 Utilities

Computer Training Software - Recommended Training VideosGuy Thomas recommends Computer Training Software

Their topics and material are ideal for getting you started with VBScript.  The videos are easy to follow and you can control the pace.  Try their free demo material and then see if you want to buy the full package. See more about VB Script Training CD.


 *


Google

Webcomputerperformance.co.uk

GFi Events Manager

Guy Recommends: GFi EventsManager

Here is a solution to monitor, manage and archive thousands of events that are generated by devices across your entire network.  Get your free evaluation copy of GFI EventsManager.

 

Home Copyright © 1999-2008 Computer Performance LTD All rights reserved

Please report a broken link, or an error.