> I'll log the login and Logoff time of any User in a Domain and I'll evaluate this data for every User at last of month.
Hi
This is not an easy task. You can get information on when the users last logged
on by query every DC and select the record that is newest for a user.. For an
example on this, take a look here:
Last logon dates
http://www.rlmueller.net/Last%20Logon.htm
For the logoff, I think you need to query the event logs on your server(s) (and
if the computer freezes, or the user just reset/turned off the computer without
using the shutdown/restart menu, I don't think you will find anything in the
event logs at all)
There are tools out there that can help you (with an agent installed on every
computer), I think the two products below should be able to give you the
information you want (at least the UserLock product, it states that it tracks
the activity of logon and logoff through a CSV log file)
UserLock
http://www.softwareshelf.com/products/display.asp?p=42
Microsoft's solution:
You could install the CCONNECT Microsoft Resource Kit utility onto every
computer, it is in the Win2k Server Resource Kit, Supplement 1 (pay ware, and
you will need a SQL server database as well).
More about CCONNECT here:
http://groups.google.com/groups?selm=3F5CE888.8A3EE8D3%40hydro.com
--
torgeir
Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of the 1328 page Scripting Guide:
http://www.microsoft.com/technet/scriptcenter
For logon:
echo Log On,%username%,%date%,%time%>>\\server\openShare\%username%.csv
For logoff:
echo Log Off,%username%,%date%,%time%>>\\server\openShare\%username%.csv
Log off scripts, uh, where do they go again? Something like Windows
settings\scripts\shutdown in the policy editor or something?
But, anyway, that would create a .csv file like:
Log on,jsmith,11/16/2003,8:30 AM
Log off,jmith,11/16/2003,5:02 PM
It would just be kinda like a csv with those two events.
Ray at work
"Mr. @" <anon...@discussions.microsoft.com> wrote in message
news:1292B389-5388-4C49...@microsoft.com...
> Hi,
>
> I'll log the login and Logoff time of any User in a Domain and I'll
evaluate this data for every User at last of month.
>
> can anybody help me?
> Thanks
> Use .bat
>
> For logon:
>
> echo Log On,%username%,%date%,%time%>>\\server\openShare\%username%.csv
>
> For logoff:
> echo Log Off,%username%,%date%,%time%>>\\server\openShare\%username%.csv
one small issue here, if you don't have a proper logoff, this one will not be
written...
Ray at work
"Torgeir Bakken (MVP)" <Torgeir.B...@hydro.com> wrote in message
news:3FC5273B...@hydro.com...
Thanks
--
The Windows Networking Site www.bitbuilder.de
I have used logon and logoff scripts (using Group Policy) to keep a log. A
sample logon script that appends a line to a log file every time a user logs
on is linked on this page:
http://www.rlmueller.net/Logon5.htm
The log file should be in a shared folder. The group "Domain Users" should
have write access to this share. The log includes user name, computer name,
date/time, and IP address. A similar program could be used as a logoff
script to enter a similar line for logoffs. The fields are delimited by
semicolons, so that the text file can be imported into a spreadsheet for
analysis.
In a large network with many sites, you should have one log file per site.
Generally, it does not slow down logons much to write to the log file over
the WAN. However, if that is a concern, the logon script could determine the
site and write to a log file at the local site. You might then want to
combine the log files from the various sites.
You can also code startup and shutdown scripts to log similar information
(except the user name). If there is an improper logoff (perhaps the power
fails), there will be no logoff. However, if there is a startup on the
client (or even another logon), you know the previous user was
disconnected - you just don't know exactly when. When you import the log
into a spreadsheet, you can sort the rows by machine name to evaluate this.
--
Richard
Microsoft MVP Scripting and ADSI
HilltopLab web site - http://www.rlmueller.net
--
"Ray at <%=sLocation%>" <myfirstname at lane34 dot com> wrote in message
news:%23z33S0G...@TK2MSFTNGP10.phx.gbl...