Jan 23 2024 06:36 AM
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 connect to rds based on their remote desktop configuration the session start on both monitors or on a single one.
is possible to deploy a policy so the session start for everyone in full screen on just one monitor?
Kind regards
Daniele
Jan 23 2024 07:01 AM - edited Jan 23 2024 07:06 AM
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
Feb 23 2024 02:36 AM
hello, thanks for the reply. but the first row returns empty variable so the script wont work.
Daniele