Solved

terminal services logging

Posted on 2006-10-27
7
255 Views
Last Modified: 2010-04-18
Hello I have a ceo that woudl like to log who is connected to the the terminal server and how long they were one. How do i do this
0
Comment
Question by:zenworksb
  • 4
  • 2
7 Comments
 
LVL 19

Expert Comment

by:BLipman
ID: 17821922
You could write a simple program that would parse the event logs.  Just make sure the security log is auditing the events you need and find a log parser.  

Log Parser 2.2
http://www.microsoft.com/downloads/details.aspx?FamilyID=890cd06b-abf8-4c25-91b2-f8d975cf8c07&displaylang=en
0
 
LVL 9

Expert Comment

by:SamuraiCrow
ID: 17822407
Just a thought...

You could also add a login/logoff script using the gpedit.msc (local computer policy) that runs a batch file with the following syntax:

echo %username%,%date%,%time% >> C:\%username%.txt

This will basically create an entry everytime they log on or off.  It also stores it by username for easy tracking.  I'll test it out and see how it works.
0
 
LVL 9

Expert Comment

by:SamuraiCrow
ID: 17822471
I just tested this and it works.  You probably want the result files to get sent to a hidden report share somewhere.  Just replace the c:\ with \\servername\sharename$\.  One more change I would make for the logon script is:

echo %username%,-Logon-,%date%,%time% >> C:\%username%.txt

For the logoff script add:

echo %username%,-Logoff-,%date%,%time% >> C:\%username%.txt

0
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 

Author Comment

by:zenworksb
ID: 17836722
how do i create this in gpedit?
0
 
LVL 9

Expert Comment

by:SamuraiCrow
ID: 17836853
Do the following:

Create a file called logon.bat in C:\WINDOWS\System32\GroupPolicy\User\Scripts\Logon with the following (customize for your enviroment) syntax:
echo %username%,-Logon-,%date%,%time% >> C:\%username%.txt

Create a file called logoff.bat in C:\WINDOWS\System32\GroupPolicy\User\Scripts\Logoff with the following (customize for your enviroment) syntax:
echo %username%,-Logoff-,%date%,%time% >> C:\%username%.txt

Open GPEdit.msc and goto:

User Configuration
Windows Settings
Scripts (Logon/Logoff)
Double Click Logon (in the right pane)
Select Add
Select Browse
Select Logon.bat

Do the same steps to add the logoff.bat file to the local policy logoff script.
0
 

Author Comment

by:zenworksb
ID: 17837862
i did that and it has started logging. a couple of questions. I would like to run a report that will input this all into a spread sheet for teh ceo to read, and also does this info continue to append or everytime a person logs oon and off will it just overwrite? thank tyou so much
0
 
LVL 9

Accepted Solution

by:
SamuraiCrow earned 500 total points
ID: 17837980
It will append.  If you want it to overwrite you can change the >> to a > .  These will be basic text files with the information being delivered in a CSV type format such as:

scrow,-Login-,Mon 10/30/2006,13:20:18.25
scrow,-Logout-,Mon 10/30/2006,14:20:18.25

You could indeed import these into excel or even create an access or SQL database program to read these as the comma seperation lends itself to all sorts of uses.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Many of us need to configure DHCP server(s) in their environment. We can do that simply via DHCP console on server or using MMC snap-in on each computer with Administrative Tools installed in a network. But what if we have to configure many DHCP ser…
Setting up a Microsoft WSUS update system is free relatively speaking if you have hard disk space and processor capacity.   However, WSUS can be a blessing and a curse. For example, there is nothing worse than approving updates and they just have…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now