2
我一直在嘗試通過Powershell遠程會話設置遠程計算機的屏幕分辨率。我可以從Get-DisplayResolution cmdlet中獲得解決方案,然後返回以下內容。Powershell遠程會話,似乎無法設置屏幕分辨率?
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:\>
這是非常令人沮喪,因爲我甚至不能似乎能夠改變顯示分辨率爲它當前設置爲,因爲我不斷收到錯誤
的設置傳遞能不適用於圖形設備 。
我試過在我的機器上本地,它似乎工作得很好。以下是遠程計算機上顯示的Powershell版本。
[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:\>
有沒有人知道解決這個問題的方法?先謝謝你。
您提到的命令可能會返回會話的分辨率,而不是控制檯,它不支持更改(可能根本沒有分辨率,而只是返回默認值或分辨率配置文件設置爲在登錄時使用)。嘗試更改控制檯上的分辨率,看看它是否反映在您的會話中。 –
您實際上不能在遠程會話中更改分辨率。您應該可以設置默認值,但不能設置活動GUI會話的分辨率。即使遠程桌面設置連接的分辨率,顯示屬性也被禁用。 – Eris
@致命百吉餅如何根據您的建議在控制檯上設置分辨率?這是一個運行在vm-ware服務器上的虛擬機。 –