I am looking for a way to close all active Remote Desktop sessions on a computer (local computer). Windows includes a couple of commands (rwinsta, qwinsta, etc.) to look at the active sessions, but I don't see how I could easily use the information (unless I parse the string...) to close all the sessions.
Is there a way in Powershell (or C#, Batch) to close all Remote Desktop sessions on a local computer?
Thanks