Logoff Remote Desktop Sessions from the Command Line

By |2018-06-27T12:02:27+00:00June 27th, 2018|Windows Server|0 Comments

Here’s an easy way to view RDP sessions for other servers from the command line and log them off if you need to. The only requirement for this is that you are a domain admin.

From an elevated command prompt, run the below the command, replacing <server> with the hostname or FQDN of the server you want to view the sessions of.

qwinsta /server:<servername>

This will show you a list of all sessions logged into that server.

If you want to logoff one of these sessions, run the below the command replacing <session ID> with the session ID which you want to logoff, which is shown in the above command.

logoff /server:<servername> <session ID> /v

This will then log off the session.

Hope this helps!

Leave A Comment

like what you see? 

Sign-up to our newsletter and never miss out on the latest blogs, events and tech news from the world of risual
Give it a try, you can unsubscribe anytime.