Solved

terminal services logging

Posted on 2006-10-27
7
281 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
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 

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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Suggested Solutions

Recently, I had the need to build a standalone system to run a point-of-sale system. I’m running this on a low-voltage Atom processor, so I wanted a light-weight operating system, but still needed Windows. I chose to use Microsoft Windows Server 200…
ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

856 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