We have domain users that use a remote instance of an app through RDP. The app is quite buggy, and their session needs reset frequently. I'd like to build a script that uses psexec from the client to reset the session on the server.
psexec \\server -u user -p pass query session
shows all the sessions
psexec \\server -u user -p pass reset session_id
resets the session based upon the id.
I need a way to reset the session based upon the username, instead of session name or id