Link to home
Start Free TrialLog in
Avatar of Andy Coyle
Andy Coyle

asked on

Force closing an RDP session - Server 2016

I have recently upgraded to a server 2016 machine from a server 2008 machine. The cutover is complete almost everything if good. Both servers are running as workgroup servers.

Two locations are involved. The server is at location a. The systems at location b access practice management software using RDP via a VPN
 
Terminal services is up and working with 12 remote users. (The full office).

The practice management software uses system variable letters for licensing. Should a remote user restart their PC or dump the terminal services session without closing the app the app does not know they did that and that letter is hung and cannot reconnect.

In server 2008, I could go into RDP session manager and close the session. I do not see that functionality in server 2016.

My questions are - Is there a way to do this in server 2026? and Is there something I can add on to get this working? Thank you
Avatar of ☠ MASQ ☠
☠ MASQ ☠

Microsoft decided not to add this to TS 2016 but you can copy across the application from 2008 R2 and it works normally.

https://www.lemonbits.com/2018/06/12/remote-desktop-services-manager-2016/
Server 2016 relies HEAVILY on a domain for RDS.  From configuring the RDS licensing mode (user vs device), pointing to the licensing server, or managing sessions (including shadowing, disconnecting, or forcing a logoff), all the GUI tools need the connection broker role and the connection broker needs a domain.

If you insist on running a workgroup, all of those things are harder... As I'm sure you discovered if you indeed have licensing working. You have to resort to command line, registry edits, or group policy to do various tasks. Which as an aside, I strongly recommend using the licensing diagnoser to verify you didn't miss anything. Nothing is more painful than having dozens of users complaining when their critical RDP app is unavailable because the licensing grace period expires three months after it all seemed to be working. A ton of EE questions pour in for exactly that scenario.

Back on point, you CAN disconnect/force logoff sessions via powershell. That's the only reliable way without a domain. *WITH* a domain, itnis a simple right click in the "Server Manager" GUI.

Using tools from another OS is a bad idea for a few reasons and can impact server stability as those APIs have changed.
Avatar of Andy Coyle

ASKER

So far, two interesting and diverse solutions. Let's see if this helps.

This server exists solely to run this one practice management application. The users do not use ms office or any other in house apps. Anything else is browser based.

Since it is a single server site I would think that adding a domain would add overhead. I am not sure how much overhead, some none tge less.

On average, I need to take a session down once a week, if that.

Thank you for answered so far. Looking forward to other suggestions.
Cliff Galiher - I did run the license diagnose and it found no errors.
On general, a domain reduces IT overhead when there are more than just a couple of users. Centralized identity management alone more than pays any technology debt incurred by patching a domain controller.

Given the hyper-v licensing rules on server standard and the minimal jsrdware requirement increases there is no monetary cost to doing so.
Connect via RDP as admin, then open Task Manager, Users, and kill sessions there. Brute force, but should work for you.
Thank you.

Looking into a power shell script as well.
Server Manager --> Remote Desktop Services --> Collection --> Right click "Active" or "Disconnected" user and Sign-Out/Log-Off.

That should do it.

EDIT: As an alternative, log on to the Session Host --> Task Manager --> Users tab --> Right click and Log Off.
Thank you
Here's one more way, via the command line:

Use the query session command (or qwinsta) to list active sessions, then use reset session (or rwinsta) to reset the one you want.
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.