We have just implemented RD Gateway for our own department in preparation for a push to the whole agency for telecommuting. It is all setup and working great, but I was trying to figure out how best to go about monitoring/reporting of users. I see third party software out there that will do it, but is there anything built-in or via powershell/scripting that I could use that would give me a report of the daily activity of users? Something to say, "User A connected at this time, was on for this long, sent/received this much data"? Basically some of the same stuff you can see in event viewer. Ideally I'd like to be able to have this setup so that once a day it emails me with the daily usage for when a supervisor asks about if their person is actually working (or at least online sending and receiving x amount of data), I'll have some metrics to give them. I realize that actual work output is relevant and more of a managerial issue, but I would like to be able to offer as much as I can from my end when asked.
Thoughts? Thanks!
I wrote a script a while back which I'll include at the bottom of this post, but I need to say a few things about it first.
It's not perfect. It's not even working well enough that I use it on a regular basis. I'm posting it because there are some things in there that will help you if you decide to roll your own solution with PowerShell. This should get you about 80% of the way there. The reason for writing this script probably had more to do with experimenting with Google Charts and querying event logs using XML filters than it did actually finding a workable solution for Remote Desktop reporting. I apparently hardcoded a few things in there (like the name of the terminal server) which I meant to go back and fix (before I abandoned it) as you can tell from my comments. The script should either create a graph or return "No activity." Sometimes it just outright hangs...
Anyway, it will create a color graph of the user's activity over a day that looks like the following --
Please do not use this script as an example as to how this should be done, it's just how I did it a long while ago. Without further ado...
To run this script, do the following --