I have a couple of DB servers that each run a RemoteApp that users launch to access said DB. The problem is that the application itself does not always exit gracefully when the user ends it, which leaves a remote session open and the user is unable to access said app again.
What I am trying to create a script that would terminate any current existing connection to each specific server (i.e. Script A would terminate for RemoteApp A, Script B would terminate for RemoteApp B).
Not sure if it adds an extra complication but the users are all working in a Remote Desktop environment (i.e. user connects to RDS1 or RDS2 and then launch RemoteApps to DB1, DB2 etc. from there).
All servers are running Windows Server 2012 R2.