Forum Discussion
Marfoned
Jan 23, 2024Copper Contributor
RDS on single screen
Hi all, We have a farm based on Windows Server 2022 Datacenter with full desktop provided to users (no remote apps at the moment). some of my users have a dual monitor setup, and when they connec...
MathieuVandenHautte
Jan 23, 2024Iron Contributor
Hi Marfo91,
We provide users this script to change default RDP multi monitor behavior when connecting:
$commands = Get-WmiObject Win32_Process -Filter "name = 'mstsc.exe'" | Select-Object CommandLine
ForEach ($command in $commands) {
$commstr = " " + $command
if ($commstr -Like "*multimon*")
{
$newcommstr = $commstr
$newcommstr = $newcommstr.Replace(' /multimon', '')
$newcommstr = $newcommstr.Replace('"','')
$newcommstr = $newcommstr.replace('@{CommandLine=', '')
$newcommstr = $newcommstr.replace('}', '')
$newcommstr = $newcommstr.Trim(' ')
}
}
Invoke-expression $newcommstr