This post is for my reference 🙂
Tired of using mouse right+click & logoff “session ID” command at run.
Finally I got a solution to logoff many disconnected RDP sessions at once.
It is simple 😉
From Tsadmin console Start>run>tsadmin.msc>Choose a server >console right hand side click on users tab>select disconnected RDP users > right+click then Logoff
I agree there are many scripts available to use to do this activity, but risk involved in using of scripts in production environment 🙂 I feel GUI is simple and easy way to accomplish this task.
To query user sessions: run commands qwinsta or query session