Remove “Connect to a remote PC” tab from Remote Desktop Web Access

UPDATE: See Paulo’s comment for an update / fix from Microsoft for this issue. My solution still works, but a Microsoft update is available.

Recently we published a Remote Desktop connection for a customer using Windows 2012 Remote Desktop Web Access.
Upon showing the page, the tab “Connect to a remote PC” was shown:Image
When testing the environment the customer wanted this tab removed, since it added only confusion to the users.

Googling around I found several solutions. One as described by Microsoft in which describes a method using IIS Manager to edit the application properties to not show Remote Desktops in a Windows 2008R2 environment.
This method is also described by numerous other people to be working in Windows 2012 environments.
Since we only publish a Remote Desktop connection and no Remote Apps, we ran into an issue:
Obviously all Remote Desktop functionality is hidden now.

On your server hosting the RDweb application open a File Explorer and browse to C:\Windows\Web\RDweb\Pages.
Make a safety-copy of the file “Site.xsl” and then edit the original file.
Remove the selected lines. This will effectively remove the seperator between the two tabs on the Remote Web Access page.
Edit the textblock <xsl:otherwise>.. </xsl:otherwise> as shown in the screen above and save your changes. This last edit will effectively remove the ability to click the second tab.

Next browse to C:\Windows\Web\RDweb\Pages\en-us (or any language you support).
Make a safety-copy of the file “Default.aspx” and then edit the original file.
Find the highlighted line and edit it to look like the line shown in the screenshot. So remove the text “<%=L_DesktopTab_Text%>” and change “Desktops.aspx” into “Default.aspx”. This change effectively “hides” the tab.

Reload the Remote Web Access page:
Voila, tab to “Connect to a remote PC” removed, Remote Desktop functionality retained.
You will probably have to redo these changes after patches / service packs that affect the RDweb application.



20+ years experience in Microsoft powered environments. Enjoy automating stuff using scripts, powershell, and even batch files. In my free time (hah! as if there is any) I hunt achievements and gamerscore on anything Xbox Live enabled (Windows Mobile, Windows 8, Windows 10, Xbox 360 and Xbox One). When I'm not doing that I enjoy traveling or riding my Yamaha R1 on the edge ;)

Tagged with: , , ,
Posted in Customize, Remote Desktop, Windows 2012
9 comments on “Remove “Connect to a remote PC” tab from Remote Desktop Web Access
  1. Kevin peterson says:

    No need to do such complex coding for remotely accessing computers. There are already readymade remote support tools available in market such as logmein, gosupportnow, GoToMyPC, RHUB appliances etc. which can be used for remotely accessing computers from anywhere.

  2. Paulo says:

    You don’t need to remove code.

    Microsoft Bug and Workarround:

  3. Rajeev says:

    There is no need to change OS’s code to show/hide this tab, this functionality is already built in in the RDWeb configuration. Set ShowDesktop variable to be false. More info here:

    • Arjan Mensch says:

      You are correct. However, at the time of writing, there was a bug in the code (confirmed) which is described in the post. The post was based on experiencing the bug in Windows 2012. I too can confirm that this bug has been addressed at least in Windows 2012 R2.

  4. Ryan Davis says:

    These articles are fantastic–thanks! Is there any way to show the “Connect to a remote PC” tab only for specific users/groups?

  5. Eli says:

    I guess MS fixed it fully. I’m using fully patched 2012R2 as of September 2015.
    Just changed “showdesktop” in IIS to “false”. No code changes needed.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

Blog Authors

Enter your email address to follow this blog and receive notifications of new posts by email.

Join 400 other followers

Blog Stats
  • 2,725,603 hits
%d bloggers like this: