I have been trying to set the screen resolution of my remote machine via a Powershell remote session for a while now. I can get the resolution from the Get-DisplayResolution cmdlet and I get the following back.
PS C:\> Enter-PSSession -Session $rs
[vm.company.com]: PS C:\Users\username\Documents> cd \
[vm.company.com]: PS C:\> Get-DisplayResolution
1024x768
[vm.company.com]: PS C:\> Set-DisplayResolution -Width 1440 -Height 900 -Force
setres will now attempt to apply the following display settings:
Width: 1440
Height: 900
The settings passed in could not be applied to the graphics device.
[vm.company.com]: PS C:\> Set-DisplayResolution -Width 1024 -Height 768 -Force
setres will now attempt to apply the following display settings:
Width: 1024
Height: 768
The settings passed in could not be applied to the graphics device.
[vm.company.com]: PS C:\>
This is very frustrating because I can't even seem to be able to change the display resolution to what it currently is set to because I keep getting the error
The settings passed in could not be applied to the graphics device .
I've tried this on my machine locally and it appears to work just fine. Here is the version of Powershell that displays on the remote machine.
[vm.company.com]: PS C:\> $PSVersionTable
Name Value
---- -----
PSVersion 3.0
WSManStackVersion 3.0
SerializationVersion 1.1.0.1
CLRVersion 4.0.30319.34209
BuildVersion 6.2.9200.17065
PSCompatibleVersions {1.0, 2.0, 3.0}
PSRemotingProtocolVersion 2.2
[vm.company.com]: PS C:\>
Does anyone know a way around this problem? Thank you in advance.
As far as I know, you can only change the resolution of a remote host at connection time.
Depending on the tool you use, look for remote desktop size settings, for example on the command line :
mstsc /w:1440 /h:900 /v:remote_host
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With