Windows Remote Desktop: Use Subset of Monitors
The missing checkbox
If you use Remote Desktop (RDP) in Windows and have three or more monitors, you probably have noticed that there is no option to select only some of the monitors. So if you have three monitors and only want to use two of them, you are out of luck - the application only seems to support either exactly one monitor, or all three. But fear not - there is a hidden option for using a subset of monitors. And as an added bonus: I wrote a little PowerShell script to automate setting it up. Read on for more.
What is remote desktop?
I will assume that if you ended up here, you already know what remote desktop is, so let's just skip this part!
Having multiple monitors is great for productivity, and when using remote desktop, we might want to use, say, two of them for the remote session, and one for the local computer. If we open remote desktop, we can configure it to use multiple monitors, but there's no apparent option to select 2 out of 3 monitors. But the option exists, it's just hidden.
The key here is to save the connection as an RDP file and edit it in a text editor. At the end of the file, we will add
To get the indices, start remote desktop with the
It might be tricky to decipher the information above, but it tells us what position of the screen each monitor has.
If we assume a setup where all monitors are on the same level - and not on top of each other - I find it helpful to just look at the first X coordinate and go from lowest to highest and note each index. The index is the first digit on each line, and the X coordinate is the first number inside the parentheses, so from the numbers above, the X coordinates are 0 (index 0), -1920 (index 1), and -3840 (index 2). Sorting from smallest to largest X coordinate gives us -3840 (index 2), -1920 (index 1), and 0 (index 0). The corresponding indices are then 2,1,0. We will use this information when editing the the RDP file.
Also, note that Remote Desktop requires us to use monitors that are next to each other (we cannot use one to the left, one to the right, and skip the one in the middle).
Now that we have the indices in the correct order, we first open "regular" remote desktop and save the current settings as an RDP file (you can find the option by clicking on "Show options", it's on the General tab in the Connection settings section).
Then open the file with a text editor, and at the end, add a new line with the setting. In this case, the order is 2,1,0 and since we want the two leftmost monitors, we pick the number from the left: 2,1. We then add a new line with this content:
Now save the file and doble-click it to open the session with your selected subset of monitors!
Bonus: Automate with PowerShell
I often create different connections which results in a different rdp file each time. Since I cannot be bothered to edit them by hand every time, I set up a small PowerShell script to find the latest rdp file in the user's download folder, edit it to use 2 out of 3 monitors, and open the file. So instead of having to download the file, use