Solved

Server 2012 R2:  Kill multiple RDP sessions

Posted on 2016-09-22
5
57 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 9

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 23

Accepted Solution

by:
Dirk Kotte earned 500 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 23

Assisted Solution

by:Dirk Kotte
Dirk Kotte earned 500 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

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

Suggested Solutions

I don't know if many of you have made the great mistake of using the Cisco Thin Client model with the management software VXC. If you have then you are probably more then familiar with the incredibly clunky interface, the numerous work arounds, and …
What to do when Windows Update is not working correctly? What tools can I use to detect the cause of the malfunction problem? What does this numeric error code mean? These and other questions that you have been asking in the past are answered here (…
In this Micro Tutorial viewers will learn how to use Windows Server Backup to create full image of their system. Tutorial shows how to install Windows Server Backup Feature on Windows 2012R2 and how to configure scheduled Bare Metal Recovery backup.…
This tutorial will walk an individual through the process of configuring their Windows Server 2012 domain controller to synchronize its time with a trusted, external resource. Use Google, Bing, or other preferred search engine to locate trusted NTP …

756 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