3

I want to adjust the Display scaling settings of a remote virtual machine via Citrix:

enter image description here

(picture from another computer)

but I get the error message:

enter image description here

ms-settings:display
This file does not have an app associated with it for performing this action. Please install an app or, if one is already installed, create an association in the Default Apps Settings page.

Question: Is there is a way to adjust these settings in PowerShell without admin rights?

Foad
  • 892
  • 4
  • 19
  • 54

2 Answers2

1

The version below:

  1. chooses 1 of my 2 monitors
  2. Is updated to the current Windows 11.
  3. Just types in the scale percentage (in the example below I set the scale to 125%)
  4. Adds some clarification of what each line does.
# Note that the number of tabs can vary between Windows versions.
explorer ms-settings:display; # open display settings
Start-Sleep -Seconds 1; # wait a second before display settings opens. You may need more or less seconds depending upon the speed of your machine. 
$WshShell = New-Object -ComObject WScript.Shell;
Start-Sleep -Milliseconds 500;
$WshShell.SendKeys("{TAB 4}{ENTER}"); # 4 tabs to enter chosing display. ENTER to select the right monitor (I've got 2)
Start-Sleep -Milliseconds 500;
$WshShell.SendKeys("{TAB 14}125"); # 14 tabs to enter Scale field. Type 125 to set it to 125%. 
Start-Sleep -Milliseconds 500;
$WshShell.SendKeys("%{F4}");
0

Similar to the Is it possible to change display scaling via command line? answer on that post, this is a PowerShell equivalent that seems to works from Windows 10.

The example below will set the screen from 150% back to 100% in that case and works. Depending on your starting and ending scales, you will need to adjust the TAB # and UP/DOWN # accordingly.

Regarding the error when running ms-settings:display perhaps passing that to explorer as per the PowerShell below will work otherwise here are a couple resources to help you iron this out.

Please note that if the machine you connect to via Citrix has policies set and this is restricted per some policy configuration, you may not be allowed to change those settings. I know RDP does not allow you to change scaling via RDP so there could be an equivalent Citrix reason this cannot occur and thus this may be why the server admins could have put such a restriction in place, so it's probably worth asking them about this too.

PowerShell

explorer ms-settings:display;
Start-Sleep -Seconds 2;
$WshShell = New-Object -ComObject WScript.Shell;
Start-Sleep -Milliseconds 500;
$WshShell.SendKeys("{TAB 2}{UP 5}");
Start-Sleep -Milliseconds 500;
$WshShell.SendKeys("%{F4}");

Supporting Resources