Software Knowledge

  1. Home
  2. Docs
  3. Software Knowledge
  4. MICROSOFT
  5. Windows: How to remote terminate session on another server
Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors

Windows: How to remote terminate session on another server

http://www.mydigitallife.info/how-to-remotely-terminate-and-disconnect-remote-desktop-terminal-services-connections-or-sessions/

Method 1

The Terminal Services Manager or Remote Desktop Services Manager can be used to disconnect and reset any Terminal Services or Remote Desktop connections. Depending on operating system, there are different ways to start and run Terminal Services Manager.
Windows XP and Windows Server 2003 or earlier:

Click on Start -> Run and type %SystemRoot%\System32\tsadmin.exe

Windows Vista Windows Server 2008:

Click on Start and type tsadmin.msc into Start Search box.

Windows 7 and Windows Server 2008 R2 or later:

Click on Start and type Remote Desktop Services Manager into Start Search box.

Tip: On client operating system or workstation, Remote Server Admin Tools (RSAT) has to be installed for the Manager to exist.

Once the Remote Desktop Services Manager or Terminal Services Manager is launched, right click on “Remote Desktop Services Manager’ or “All Listed Servers” and select Connect to Computer.
Then, type in the name or IP address of the server running Remote Desktop Services that wants to be managed.
Log on to the remote server if required.

Authenticated server will be listed on the left pane. Select the applicable server with not responding Remote Desktop session.
On the right pane, go to Sessions pane.
Right click on the session that wanted to be disconnected and select Disconnect.
Method 2

Launch a Command Prompt window.
Authenticate to the remote computer by using the following “net use” command:
net use /user:Administrator \\C$

Replace with actual NetBIOS computer name or IP address of the remote host. For example, “net use /user:Administrator \188.8.8.8\C$.

Enter password when prompted.

Terminate any existing Remote Desktop or Terminal Services connections with the following command:
reset session /server:

Replace with actual NetBIOS computer name or IP address of the remote host. For , enter a number incrementally starting from 1, 2, 3 …, until a message “session ID n not found” is been returned as error when executing the command. For example, “reset session 1 /server:188.8.8.8″.

Tip: No notification message will be displayed when a session is successfully terminated.

Method 3

Launch a Command Prompt window, and authenticate to the remote host by using the following “net use” command:
net use /user:Administrator \\C$

Replace with actual NetBIOS computer name or IP address of the remote host. For example, “net use /user:Administrator \188.8.8.8\C$.

Enter password when prompted.

Alternatively, from Windows Explorer, map to a network drive to share a folder on the target server, and log in accordingly.

In Command Prompt, run the following command:
qwinsta /server:

Where is the actual computer name or IP address of the remote host. For example, “qwinsta /server:188.8.8.8″.

A list of active and connecting Remote Desktop or Terminal Services sessions will be displayed. Identify the ‘hung’ connection and its ID.
To reset and disconnect the Remote Desktop connections or sessions, run the following command:
rwinsta /server:

Replace with the session ID identified with “qwinsta” command, and with the actual computer name or IP address of the remote host. For example, “rwinsta 1 /server:188.8.8.8″

Note: qwinsta is Query Window Station and rwinsta is Reset Window Station.

Once a Remote Desktop or Terminal Services connection or session is terminated and disconnected, the slot will be released and remote user can login remotely again.