Here is a problem that I have. I work at a hospital. We have a certain application installed on a dozen Windows 7 machines. Doctors leave that application open and walk away from the machine. The machine eventually locks due to inactivity and another doctor will come up and log on. They will attempt to launch the application but cannot open it because it's running in one of the other disconnected sessions. They have been instructed to log off the machines, but that is obviously to difficult so I need to identify a different way to address the issue.
Could I get some assistance with a powershell script? What I would like to do is to have script that goes through the processes that are running under the disconnected users and kill the specific process for the application. I would like to set that script up to run every 5 minutes or so under task scheduler. Is this possible?
I wanted to put a shortcut on the desktop of the machines that would kill the process, but the doctors are not administrators of the machines so I haven't been able to find a secure way of doing this. Applications like encrypted runas are not secure so putting the credentials for an administrative user into a script are not secure.
RG