Solved

Monitors users activity in Windows Terminal Services

Posted on 2007-04-06
5
2,629 Views
Last Modified: 2013-11-21
I have been asked to monitor terminal server sessions by user name. They want to see total time logged on, total idle time, as well as applications used if possible. Is there a way to monitor this in Windows 2000 or 2003 terminal services?
0
Comment
Question by:theedgehead
  • 2
5 Comments
 
LVL 77

Expert Comment

by:Rob Williams
ID: 18867953
Some of this you can monitor with the followin (copy from an earlier post of mine):

You can enable detailed auditing and within the configuration, you can configure the systems and successful and/or failed events you wish to audit. Following articles outline how to enable and analyze the results:
http://support.microsoft.com/kb/814595/
http://www.windowsecurity.com/articles/Understanding_Windows_Logging.html
http://207.46.19.60/technet/prodtechnol/windows2000serv/maintain/monitor/logevnts.mspx

However using auditing can be time consuming to filter and extract.

Another option is to add the lines below to each users logon script to create a log file. It would give you UserName, ComputerName, date and time, in a simple single line, followed by the IP from which they connected, if needed. If you wish to know logoff times as well, you can add the same lines to a log off script in group policy (if you don't already have one: User Configuration | Windows settings | Scripts | Logoff). You likely won’t need the last line (IP address) in the log off script.

As written below it will create the log/text file in \\Server\Logs\LogOns.Log and the entries will look like:
Log File

Log On:  jdoe SERVER1  Tue 1/1/2007   9:01
  TCP    10.0.1.100:3389        66.66.123.123:1234        ESTABLISHED
 
Log Off: jdoe SERVER1  Tue 1/1/2007   9:31

Log On:  jsmith SERVER2  Tue 1/1/2007   9:01
  TCP    10.0.1.200:3389        66.66.123.124:1234        ESTABLISHED
 
Log Off: jsmith SERVER1  Tue 1/1/2007   9:31
---------------------------------------------------------------------------

:Logging
If Exist "\\Server\Logs\LogOns.Log" GoTo START
Echo Log File > "\\Server\Logs\LogOns.Log"
:START
Echo. >> "\\Server\Logs\LogOns.Log"
Echo Log On:  %USERNAME% %COMPUTERNAME%  %Date:~0,16%  %Time:~0,5% >> "\\\Server\Logs\LogOns.Log"
netstat  -an  |find  "3389"  |find  /I  "established"  >> "\\Server\Logs\LogOns.Log"

---------------------------------------------------------------------------
Note the users will need to have read/write and execute permissions for the \\Server\Logs\LogOns.Log  file.
0
 

Author Comment

by:theedgehead
ID: 18882419
That will give me logged on times but I also need idle time and applications used. I can use the query command to get idle time and apps used by doing query process, query session and query user every five or 10 minutes and output that to a text file. The problem is I then have to figure a way to get that into a usable report. I'm looking at scripting a way to parse these text files to get a report of some kind but was hoping there was an easier way.
0
 
LVL 77

Accepted Solution

by:
Rob Williams earned 250 total points
ID: 18882500
There may be, but afaid I don't know of one.
I have used an application called Desktop Scout, though not on a terminal server. It logs an incredible amout of information such as applications used, how long, documents accessed, even what was done within some applications such as editing an invoice. If you wanted to have a look:
http://www.globalpatrol.net/desktopscout/
Demo version has very limited testing abillities.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

After having deployed hundreds of thousands of Terminal Services seats worldwide, I still see all the time people asking me that same old question: "If TS/RDS is that reliable why are you telling me I should reboot it that often? My DC/SQL/Exchange/…
Know what services you can and cannot, should and should not combine on your server.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

685 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