Shadow desktop connection in Windows Server 2016/2019: Step by step guide

Shadowing in Windows Server 2016/2019 allows you to remotely view and control another user’s session on the server. This is a useful feature for assisting users or monitoring their work. In this article, we will go over the steps required to perform a shadow desktop connection in Windows Server 2016/2019.

Step 1: Get the user’s session ID (Session ID)

Before making a shadow connection, you need to get the Session ID of the user you want to connect to. There are two ways to get a session ID:

Method 1: Using the Server Manager:

  1. Open the Server Manager by selecting the corresponding icon on the taskbar or from the Start menu.
  2. In the left pane of the Server Manager, right-click on Servers and select Remote Desktop Services -> “Overview”.
  3. In the Sessions Overview section, you will see a list of active user sessions on the server. Write down the session ID value for the required user.

Method 2: Use the command line:

  1. Open a Command Prompt with administrator privileges. Click Start, type “cmd”, right-click on the “Command Prompt” and select “Run as administrator”.
  2. At the command prompt, enter the following command: query session

Press the Enter key to execute the command. Write down the session ID value for the required user.

Step 2: Shadow connection to the desktop

Now that you have the session ID of the user you want to connect to, follow these steps:

  1. Open a Command Prompt with administrator privileges. Click Start, type “cmd”, right-click on the “Command Prompt” and select “Run as administrator”.

  2. At the command prompt, enter the following command: mstsc /shadow:<SessionID> /v:<ServerName> /prompt

  1. Instead of <SessionID>, enter the user session ID you received in step 1. Instead of <ServerName>, enter the name of the server you want to connect to.

  2. Press the Enter key to execute the command. You will see a dialog box confirming the shadow connection.

  3. To connect without confirmation, you can use the following command: mstsc /shadow:<SessionID> /v:<ServerName> /control

  1. Enter the user’s session ID instead of <SessionID>, and replace <ServerName> with the server name.

These were the steps to shadow desktop connectivity in Windows Server 2016/2019. Use these instructions to assist users or monitor work remotely. Be careful to respect the privacy of the users you manage.