I am running a trying to run a PowerShell script to logoff any disconnected RDP users. I am running them from task scheduler as a System Account. The script finds the ID of disconnected users in a RDP session and issues a logoff command.
I have tested the script through PowerShell (running as administrator) and it is working. This is also working on other Windows 10 machines used as terminal servers. Not sure if this is an issue with UAC or permissions. Could somebody please let me know if they know about this issue.
Leave an answer