Organizational Research By

Surprising Reserch Topic

The purpose of my code, is to run a RDP connection (in a custom shell) on thinclients. Whenever the RDP logon is cancelled, or the RDP connection gets terminated, powershell will detect this and initiate the RDP connection again. Users will always have their logon screen in front of them.

This works perfectly. But another problem is, that when the logon screen is openend for 15 or more minutes, RDP connection fails. So I want the RDP connection to be restarted every 15 minutes.

In short, I want the If-Else statement and the Timer.Elapsed condition to run side by side. I am at a loss how to get this working correctly.