Using C# to grab RDP session information
Posted on 2011-09-22
I've been trying to figure out how to get RDP session information with C#. There's a program that I'm writing, and I want some functionality to differ based on whether or not the user is logged in through RDP. I know how to check to see if the user is on an RDP session, using System.Windows.Forms.SystemInformation, but aside from that I'm not sure how to retrieve the client's machine name, the domain controller that processed the login, and
I don't want to rely on environment variables, and I really don't want to include a third-party library to do it. Any suggestions? Thanks!