Solved

terminal services logging

Posted on 2006-10-27
7
294 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

 

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

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preface Having the need * to contact many different companies with different infrastructures * do remote maintenance in their network required us to implement a more flexible routing solution. As RAS, PPTP, L2TP and VPN Client connections are no…
So you have two Windows Servers and you have a directory/folder/files on one that you'd like to mirror to the other?  You don't really want to deal with DFS or a 3rd party solution like Doubletake. You can use Robocopy from the Windows Server 200…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

739 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