How to Fulfill Pre-requisites for Remotely Shadowing User Sessions?

To run the Shadow user session command remotely on a Citrix Virtual Apps server, Microsoft RDS server, Omnissa Horizon RDS server, or any VDI component, you need to first ensure that the following pre-requisites are fulfilled:

  1. Multiple RDP sessions should be enabled on the target Windows server;

  2. Make sure Windows Firewall allows session shadowing;

  3. The user running the command remotely should be allowed Administrator privileges;

  4. The target session should be active, as a disconnected or idle session cannot be shadowed

The sections below discuss how to fulfill requirements 1, 2, and 4 cited above.

Enabling Multiple RDP Sessions on a Windows Server

For this, follow the steps below:

  1. Login to the target server.

  2. Open the Group Policy Management Editor.

  3. Browse the folder structure in the left panel, and open the Remote Desktop Services folder within. Then, expand the Remote Desktop Session Hosts folder, and click on the Connections folder therein.

  4. The right panel will then change as shown by Figure 106 below.

    Enabling Multiple RDP Sessions on Target

    Figure 106 : Enabling remote control of RDP user sessions via group policy

  5. Double click on the Set rules for remote control of Remote Desktop Services user sessions option in the right panel.

  6. When the Set rules for remote control of Remote Desktop Services user sessions dialog box appears, select the Enabled option therein to activate the policy setting. Then, pick the Full control with user's permission option from the Options list box (see Figure 106).

  7. Finally, click Apply to save the changes.

Enabling RDP Shadow in Firewall

If your firewall blocks shadow connections, then follow the steps below to configure the firewall, so the block can be lifted:

  1. Login to the target server.

  2. Go to Windows Defender Firewall, and click on Advanced Settings in the left panel (see Figure 107).

    Launching Advanced Firewall Settings

    Figure 107 : Click on Advanced Settings in Control Panel

  3. Figure 108 will then appear. Click on the Inbound Rules node in the left panel of Figure 108.

    Choosing to Configure Inbound Rules

    Figure 108 : Clicking on Inbound Rules node

  4. The right panel will change as depicted by Figure 109. Scroll down the list of inbound rules in the right panel to locate the rule with Name, Remote Desktop - Shadow (TCP-In). Once you find that rule, Once you find the rule, check if its Action state is set to Allow.

    Checking if Firewall Allows Session Shadowing

    Figure 109 : Checking if the Remote Desktop - Shadow rule is Allowed

Checking Session Status

Before shadowing a session, make sure that it is active. To determine the status of a session, follow the steps below:

  1. Login to the target server.

  2. Open the command prompt, and run the following command:

    qwinsta

  3. Upon execution, the command will output the sessions on the target and the current status of each session. From the list, pick an Active session and shadow that.

    Identifying Active Session

    Figure 110 : Identifying Active session on target