Jump to content

how to generate a daily report for logon/logoff time?


Recommended Posts

Guest Chris
Posted

I need a report to show users' logon/logoff time each day. I need this for

one office now. The users are under a few different OUs, due to GPO. How

can I do that? GUI or script?

 

Thanks.

  • Replies 1
  • Created
  • Last Reply

Popular Days

Guest Richard Mueller [MVP]
Posted

Re: how to generate a daily report for logon/logoff time?

 

Chris wrote:

>I need a report to show users' logon/logoff time each day. I need this for

> one office now. The users are under a few different OUs, due to GPO. How

> can I do that? GUI or script?

>

 

AD keeps track of the last logon time, although the attribute is difficult

to work with. AD does not keep track of last logoff time. Even if you used

lastLogon, you would need to query constantly to detect if a user logged on

5 times during the day.

 

I have used a logon script that appends user name, computer name, and

date/time to a shared log file during logon. An example VBScript logon

script that does this is linked here:

 

http://www.rlmueller.net/Logon5.htm

 

A similar logoff script could add lines corresponding to logoff. You would

configure the logon and logoff scripts in a Group Policy. The example I

linked starts each line with "Logon ;". A similar logoff script would start

each line with "Logoff ;". I delimit fields in the text file with semicolons

because there could be commas in some names. I make a copy of the log file

and read it into a spreadsheet (specify ";" as the delimiter) for analysis.

 

I believe there are also third party tools that keep track of logon and

logoff times in a database.

 

--

Richard Mueller

MVP Directory Services

Hilltop Lab - http://www.rlmueller.net

--


×
×
  • Create New...