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,
-
Multiple RDP sessions should be enabled on the target Windows server;
-
Make sure Windows Firewall allows session shadowing;
-
The user running the command remotely should be allowed Administrator privileges;
-
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:
-
Login to the target server.
-
Open the Group Policy Management Editor.
-
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.
-
The right panel will then change as shown by Figure 106 below.
Figure 106 : Enabling remote control of RDP user sessions via group policy
-
Double click on the Set rules for remote control of Remote Desktop Services user sessions option in the right panel.
-
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).
-
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:
-
Login to the target server.
-
Go to Windows Defender Firewall, and click on Advanced Settings in the left panel (see Figure 107).
-
Figure 108 will then appear. Click on the Inbound Rules node in the left panel of Figure 108.
-
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.
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:
-
Login to the target server.
-
Open the command prompt, and run the following command:
qwinsta
-
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.
Figure 110 : Identifying Active session on target