I am writing a script to open an RDP session, but I want to check to see if an RDP session is already running. My initial thought is to check for MSTSC.EXE running in memory. Any idea how to do this?
Open to alternative solutions for the problem as well. Trying to prevent a client from logging into an RDS server twice. Multiple logins are allowed because the same user may log in from different clients.