Powershell to find out disconnected RDP session and log off at the same time
问题 Is there a script that can log out my disconnected RDP session from any server? This is causing a lot of pain and constant ad account lockouts. Any help would be awesome. 回答1: I have got the answer and I am writing this answer to help someone in need as I had to figure this out myself. I created a script using online resources to find out disconnected RDP sessions on all Windows Server in my AD environment. I run a query on each Windows Server and create a CSV formatted list, I then use that