Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Logging users in Terminal Services

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Is there a way to log the users that use Terminal Services? My goal is to track the time on and duration of a user working from home connecting to the network through Terminal Services.
 
If using Citrix..you could purchase the RMS product.

But for a quick easy home-grown solution. One, obtain a shareware program named sleep.exe and now.exe

Then write a batch file with the following:


:Begin
now.exe >> c:\temp\logins.txt
quser >> c:\temp\logins.txt
sleep 60
goto begin


That's it. The now.exe will just display the time. The quser will display all the logged-in users sessions. The sleep will just wait for the 60 second interval and then you're back in the loop. You could also turn this into a service using the microsoft Resource Kit: srvany.exe command to start automatically.

Then you can pretty much use perl scripts or something else to parse the information for you. There's probably other utilities to that will parse the information directly from the Security logs too.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top