Default there is no option for the user to choose between the use of one or multiple monitors in a Microsoft RDS Farm based on Windows Server 2012(R2). Although there is an option to add/replace options in the RDP File content that is generated by the RD Web Access page. This can be done by modifying the ShowOptimizeExperience checkbox.
To accomplish this you need to execute the following steps:
Change the application settings in IIS Manager
Modify the RDWAStrings.xml file
Go to the following path: C:\Windows\Web\RDWeb\Pages\en-US
Open the file RDWAStrings.xml in notepad
Replace the text:
<string id="OptimizeMyExperience">Optimize my experience for a LAN network when connecting to the computer or application.</string>
with the following text:
<string id="OptimizeMyExperience">Use multiple monitors.</string>
Modify the Site.xsl file
Go to the following path: C:\Windows\Web\RDWeb\Pages
Open the file Site.xsl
Search for the text strRdpFileContents
Replace the text:
<xsl:if test="$showoptimizeexperience">
if (<xsl:value-of select="$feedidprefix"/>Controls.chkShowOptimizeExperience.checked) {
var objRegExp = new RegExp("connection type:i:([0-9]+)", "i");
var iIndex = strRdpFileContents.search( objRegExp );
<!-- Add 'connection type' if it does exist otherwise replace. -->
if ( -1 == iIndex ) {
if ( "\\n" != strRdpFileContents.charAt(strRdpFileContents.length-1) ) {
strRdpFileContents += "\\r\\n";
}
strRdpFileContents += "connection type:i:6\\r\\n";
} else {
strRdpFileContents = strRdpFileContents.replace(objRegExp, "connection type:i:6");
}
}
</xsl:if>
With the following text:
<xsl:if test="$showoptimizeexperience">
var pmxUseMultimon = 0;
if (<xsl:value-of select="$feedidprefix"/>Controls.chkShowOptimizeExperience.checked) {
pmxUseMultimon = 1;
}
var objRegExp = new RegExp("use%20multimon%3Ai%3A([0-9])", "i");
var iIndex = strRdpFileContents.search( objRegExp );
<!-- Add 'use multimon' if it does exist otherwise replace. -->
if ( -1 == iIndex ) {
if ( "\\n" != strRdpFileContents.charAt(strRdpFileContents.length-1) ) {
strRdpFileContents += "\\r\\n";
}
strRdpFileContents += "use%20multimon%3Ai%3A"+pmxUseMultimon+"\\r\\n";
} else {
strRdpFileContents = strRdpFileContents.replace(objRegExp, "use%20multimon%3Ai%3A"+pmxUseMultimon);
}
</xsl:if>
Note:
As you can see in the original text, Microsoft is searching for the regular expression "connection type:i:".
In the rdp file content that is generated the text is "connection type%3Ai%3A".
This means that the option "Optimize my experience" of Microsoft is never going to work.
When you now go to your RDS Web page you will see a check box with the text "Use multiple monitors"
It's very important to set the Remote App configuration "Maximum number of redirected monitors" to a number higher than 1. Unless this solution doesn't work.