This doesn't need to be a real time solution, but are there some log files or system messages that could be read to identify periods of time where someone was connected via RDP to a Windows 7 machine?
I'm building a watchdog script for a computer which will be deployed in a remote place and would like to add this metric to a daily status update.