Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


Server 2012 R2:  Kill multiple RDP sessions

Posted on 2016-09-22
Medium Priority
Last Modified: 2016-09-29

Is there a way to kill a number of RDP-sessions (but not all!) off one RDP host at once?

Question by:Ralph Scharping
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
LVL 10

Expert Comment

ID: 41811356
I guess you are trying to accomplish of closing RDP session on a server without logging on to that server. If your answer is yes, the try this


Author Comment

by:Ralph Scharping
ID: 41811386
I am trying to get several users off the server.
TSadmin will let me kill one session at a time.
I want to disconnect more than one user in one go.
LVL 24

Accepted Solution

Dirk Kotte earned 2000 total points
ID: 41815384
mostly i logon to TS and use these commands:

quser  - list of all sessions
logoff 3 && logoff 11 && logoff 18 && logoff

this make a logoff for session 3,11,18 any my own at the end
LVL 24

Assisted Solution

by:Dirk Kotte
Dirk Kotte earned 2000 total points
ID: 41815389
it is possible to use these commands remotely also.
QUSER /SERVER:Servername
LOGOFF session-ID /SERVER:Servername
QUSER /?  and  LOGOFF /?
these commands are usable within a script

Author Closing Comment

by:Ralph Scharping
ID: 41821241
Thanks a lot!

Featured Post

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The reason that corporations and businesses use Windows servers is because it supports custom modifications to adapt to the business and what it needs. Most individual users won’t need such powerful options. Here I’ll explain how you can enable Wind…
How to deal with a specific error when using the Enable-RemoteMailbox cmdlet to create a mailbox in the cloud-based service, for an existing user in an on-premises Active Directory.
In this Micro Tutorial viewers will learn how to restore single file or folder from Bare Metal backup image of their system. Tutorial shows how to restore files and folders from system backup. Often it is not needed to restore entire system when onl…
This tutorial will walk an individual through the process of installing of Data Protection Manager on a server running Windows Server 2012 R2, including the prerequisites. Microsoft .Net 3.5 is required. To install this feature, go to Server Manager…

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question