Solved

terminal services logging

Posted on 2006-10-27
7
275 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
NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the 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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

Suggested Solutions

I guess it is not common knowledge to most Wintel engineers/administrators: If you have an SNMP-based monitoring system in your environment (and it's common to have SNMP or Syslog) it's reasonably easy to enable monitoring of the Windows Event logs,…
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.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
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 …

803 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