Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Server 2012 R2:  Kill multiple RDP sessions

Posted on 2016-09-22
5
Medium Priority
?
126 Views
Last Modified: 2016-09-29
Hi.

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

Thanks,
Ralph
0
Comment
Question by:Ralph Scharping
  • 2
  • 2
5 Comments
 
LVL 10

Expert Comment

by:Zenvenky
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

TSADMIN
0
 
LVL 2

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.
0
 
LVL 24

Accepted Solution

by:
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
0
 
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
check:
QUSER /?  and  LOGOFF /?
these commands are usable within a script
0
 
LVL 2

Author Closing Comment

by:Ralph Scharping
ID: 41821241
Thanks a lot!
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

The article will show you how you can maintain a simple logfile of all Startup and Shutdown events on Windows servers and desktops with PowerShell. The script can be easily adapted into doing more like gracefully silencing/updating your monitoring s…
Resolve DNS query failed errors for Exchange
In this Micro Tutorial viewers will learn how to use Boot Corrector from Paragon Rescue Kit Free to identify and fix the boot problems of Windows 7/8/2012R2 etc. As an example is used Windows 2012R2 which lost its active partition flag (often happen…
In this Micro Tutorial viewers will learn how to restore their server from Bare Metal Backup image created with Windows Server Backup feature. As an example Windows 2012R2 is used.

877 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