Windows server разрешение экрана

Как известно, Windows Server Core — это Windows без Windows (с небольшими исключениям) и все управление им происходит либо удаленно — оснастки, PowerShell — либо локально — опять же PowerShell и разные утилиты командной строки, среди которых отдельно стоит выделить sconfig и SCRegEdit.wsf.

Но сегодня мы поговорим о методах изменения разрешения экрана на Server Core.
Для этого существует отдельный модуль PowerShell, обладающий лаконичным названием — ServerCore.
Входят в него два коммандлета — Get-DisplayResolution и Set-DisplayResolution.

Как можно понять из названия, Get-DisplayResolution отображает настройки разрешения экрана, а Set-DisplayResolution — их изменяет.

Например, так:

Set-DisplayResolution -Width 1920 -Height 1080

Страницы в социальных сетях:

Twitter: https://twitter.com/vsseth
Facebook: https://fb.com/inpowershell
VKontakte: https://vk.com/inpowershell


В последнее время темой этой колонки была настройка конфигурации Windows Server 2008 Server Core. Мы уже назначали имя серверу, присваивали ему DNS-суффикс, устанавливали статический IP-адрес, включали функцию автоматического обновления, добавляли модули сервера и выполняли настройку удаленного администрирования.

В последнее время темой этой колонки была настройка конфигурации Windows Server 2008 Server Core. Мы уже назначали имя серверу, присваивали ему DNS-суффикс, устанавливали статический IP-адрес, включали функцию автоматического обновления, добавляли модули сервера и выполняли настройку удаленного администрирования. Теперь займемся изменением разрешения дисплея — простая задача, которая становится сложной без графического интерфейса.

Со времени Windows 3.0 для настройки разрешения экрана компьютера достаточно щелкнуть правой клавишей мыши на рабочем столе и открыть окно настроек персонализации. Однако без графического интерфейса придется внести в реестр некоторые изменения.

Внесение изменений

Откроем Regedit — один из немногочисленных инструментов с графическим интерфейсом, работающих в среде Server Core, и перейдем в раздел HKEY_LOCAL_MACHINESYSTEM CurrentControlSetControlVideo. Развернем узел Video, как показано на экране, чтобы отобразить три подраздела, имеющие в качестве имени идентификаторы GUID. При настройке Windows система находит все соответствующие пары драйвер/адаптер и присваивает им случайные идентификаторы GUID (длинные случайные шестнадцатеричные строки, очевидно, гораздо нагляднее, чем такие записи, как «драйвер SVGA на адаптере nVIDIA 1»). Под каждым подразделом, снабженным идентификатором GUID, есть подраздел 0000. Внутри одного из этих подразделов 0000 находятся нужные нам записи реестра — на компьютере с Server Core актуальна только одна из комбинаций «адаптер/драйвер», а изменение нерабочей комбинации не даст результата.

Чтобы найти нужную комбинацию, исследуйте содержимое каждого из подразделов 0000, обращая особое внимание на записи с описанием устройства. На моем компьютере Server Core отображаются следующие записи описания устройства: Standard VGA Graphics Adapter, RDPDD Chained DD и VMware SVGA II. Поскольку моя система Server Core работает под VMware и я выполнил установку VMware Tools, нужный мне подраздел 0000 — третий, т. е. VMware SVGA II. Однако следует иметь в виду, что некоторые драйверы могут не иметь записей описания устройства; в частности, на моем ноутбуке Lenovo ThinkPad T61 P в подразделе 0000 реестра присутствуют стандартные записи VGA и RDPDD, а также раздел, содержащий вместо записи описания устройства запись DriverDesc со значением nVIDIA Quadro FX 570 M (должно быть, именно то, что я обычно использую на своей настольной системе). Поэтому, как и всегда при внесении изменений в реестр, будьте внимательны!

Отыскав нужный раздел 0000, найдите в нем две записи типа REG_DWORD — DefaultSettings.XResolution и DefaultSettings.YResolution. Редактируя эти значения, можно изменить ширину и высоту экрана, однако при этом необходимо убедиться, что введены соответствующие установки! После двойного щелчка клавишей мыши на записи REG_DWORD для изменения ее значения открывается диалоговое окно DWORD (32-Bit Value) редактора реестра, куда можно ввести как десятичное, так и шестнадцатеричное значение, однако вводимое число рассматривается как шестнадцатеричное. Если ввести 1024, имея в виду разрешение 1024×768, на экране отобразится 4132 (десятичное значение, соответствующее шестнадцатеричному 1024). После перезагрузки системы можно получить пустой экран или — в редких случаях — испорченный монитор. Поэтому перед выходом из программы Regedit не забудьте взглянуть на введенное вами значение!

Теперь следует завершить сеанс из системы и снова зарегистрироваться, чтобы увидеть новое разрешение экрана. Напомним, что простой способ завершения сеанса системы Server Core обеспечивает команда

shutdown -l

Здесь следует обратить внимание на то, что вводится строчная буква L, а не цифра 1.

Если разрешение не изменилось, возможны варианты действий. Во-первых, вторично проверить значение описания устройства в выбранном разделе 0000. Иногда я вижу более одного раздела 0000 со ссылкой на мой тип видеокарты. Во-вторых, вторично проверить записи, определяющие ширину и высоту экрана, для выявления возможных неправильных шестнадцатеричных значений. Наконец, напомним, что изменения не вступят в силу, пока вы не завершите сеанс системы и не зарегистрируетесь в ней вновь.

Марк Минаси — Редактор Windows IT Pro, MCSE и автор книги Mastering Windows Server 2003 (издательство Sybex). mark@minasi.com

Set custom scaling option for Server 2012+ RDS

If you log into a Server 2012+ RDS from a Windows 7 machine you will find that you cannot change the scaling (Text Size, DPI, etc.) of the desktop. This is due to the fact that by default, Server 2012 RDS will use the scaling settings of your Windows 8+ machine. If you are on Windows 7 you will only have the option for the default resolution.

Thankfully, there are some reg keys that allow us to work around this.

For all users on a machine (this will break auto scaling for Win 8 machines):

Create the following reg key on the RDS server
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\IgnoreClientDesktopScaleFactor
DWORD
Value: 1

For select users (if you only have a few Win 7 machines to deal with):

HKEY_CURRENT_USER\Control Panel\Desktop\LogPixels
DWORD
Value: 78 (hex) for 120 DPI (you can find other values in the links below)

References

https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/dpi-related-apis-and-registry-settings
https://support.microsoft.com/en-us/help/3026738/remoteapp-window-is-too-large-or-too-small-when-you-use-rdp-to-run-a-r

Popular posts from this blog

FSLogix Troubleshooting guide

Have an issue you can’t solve? I offer consulting engagements and can be reached here: consulting[а 𝐭 ]amorales[․]org This article will cover some common issues I have ran into, and steps on how to resolve them. The guide should be followed  in order  since most of the advanced items are usually not the cause of a problem. If you just set up FSLogix, make sure that you followed every step under  Deploying FSLogix Office 365 Containers  and  Deploying FSLogix Profile Containers Terminology ODFC = Office Data File Containers This is there Office (Outlook, Teams, Licensing) data is stored This can be used in conjunction with UPDs FSL Profiles Replacement for UPDs User profiles are stored here (Office data is stored in the ODFC) Cannot  be used in conjunction with UPDs Non-Issues The items below should be ignored when troubleshooting Local_ files under C:\Users If FSLogix profiles are enabled, these folders can be ignored. They…

Best Practices for Deploying User Profile Disks

Have an issue you can’t solve? I offer consulting engagements and can be reached here: consulting[а 𝐭 ]amorales[․]org Last Updated 2020-01-03 After months of testing I recommend deploying FSLogix Profile Containers instead of User Profile Disks. You can find my guide here . Some of the items below apply to FSL Profile Containers.  User Profile Disks (UPDs) are great for load balanced RDS farms since it allows users to seamlessly roam from server to server. The goal of this article will be to configure the RDS and file servers in a way that maximizes performance and reduces the likelihood of UPD disconnects. I’ll keep this updated any time I find new improvements. Use FSLogix Before you even consider deploying UPDs you need to be aware of  this limitation . On Server 2012 and 2016 (Server 2019 does not have this issue,  but it doesn’t support Office ) the Windows Search index is machine wide. This means that when a UPD is disconnected the user’s index data is d…

Removing Application UAC Requirements with Shims

This guide will show you how to create shims that allow regular users to run applications that normally require local admin. Shims should only be used as a measure of last resort. In many cases simply granting users to certain folders or reg keys eliminates the need to create a shim. You can use LUA Buglight to identify what those reg keys/files are.   How it works The shim will force the application to use «RunAsInvoker» when it is launched. RunAsInvoker tells the application to open with the privilege level of whatever launched it. For example, if a regular user opens the application through explorer.exe (a non admin process) then the application will open with regular user permissions.  Things to keep in mind: Shims should be installed after the application Shims might need to be re-installed if an application is updated Not all apps play well with shims. Make sure to test the application before putting it into production Pre-Requisites Install the Microsoft Applicati…

Since Windows Server 2008 Server Core doesn’t have access to display properties, you must change the screen resolution using the registry. Here’s how:

  • Log into Server Core with an admin account
  • Run Regedit from the command prompt and modify the following reg keys:

HKLM\System\CurrentControlSet\Control\Video

  • There, you will find one or more GUIDs. Expand each one to find the one with a VolatileSettings subkey under the 0000 subkey (usually the first GUID)
  • Double-click the 0000 key and modify the DefaultSettings.XResolution and DefaultSettings.YResolution values to set your resolution
  • Close Regedit
  • Logoff and log back on to receive the new resolution settings

Ok, yesterday one of our many Nutanix clusters was upgraded to 5.15 LTS and I started to create a new Windows Server 2016 template using UEFI-configuration.

Now I am stuck at display resolution of 1280×1024 and change is not possible, because it is grayed out. Nutanix Guest Tools from 5.15 LTS and VirtIO 1.1.5 are installed.

Is this bug known and does there exist a work-around?

What about 5.16 STS? Is it fixed there?

Thanks for any reply.

Regards,

Didi7

Hi Didi7,

To make sure we’re on the same page is this where the option is greyed out?


Hello Alona, no it is not within the UEFI configuration, you are stuck at display resolution 1280×1024 within Windows OS.


Changing resolution within UEFI-configuration is possible but has no effect during installation. The whole installation process of a Windows VM can only be done with 1280×1024, so you are forced to use big monitors to succeed with the installation of Windows Server 2016 and as you cannot change the resolution during installation, you are also stuck at 1280×1024, when Windows is fully installed and Nutanix Guest Tools, as well as VirtIO drivers are installed.

Really, that’s so annoying and really not resonable to customers.

Might be fixable with an Nutanix display driver, don’t know?

Using non-UEFI VMs during installatation of Windows Server 2016 results in the same Monitor and display driver, but you can change resolutions.

Is there a solution from Nutanix available or is this a known bug?

Does there exist a work-around?


Would it be correct to say that the issue you are experiencing is when connecting to the VM by using “Launch console” feature in Prism? When using “Launch console” screen resolution is picked up from UEFI settings and Windows driver does not have the ability to change that setting. Therefore, you would need to change the resolution settings in UEFI in order to affect VNC connection resolution.

The thing is, VNC is intended for troubleshooting, debugging and such rather then as a all time access tool.

Does the issue appear when you connect via RDP post the installation? RDP is using a different driver hence you should be able to adjust the screen as required.

Have you considered deploying VMs from an image? This way you can skip the installation phase entirely and arrive at initial set up. I would recommend to sysprep the OS prior to making an image out of it. AFAIK, sysprep defaults the resolution to 1024 x 768 – something to keep in mind.

Here is a KB describing the issue that you encountered specifically KB-4792 AHV | How to change display resolution on Windows VMs running in UEFI mode.


Quote: Would it be correct to say that the issue you are experiencing is when connecting to the VM by using “Launch console” feature in Prism?

Yes absolutely, but as long as there is no network connection, one is forced to use the VNC Console until everything is setup and I am talking about VM-template generation, where there are no network connections availaible, as here they stay disconnected. Updates, like Cumulative Updates in Windows Server 2016 are done via ISO medias. After syspreping and cloning those VM-templates, they get connected to networks and then RDP is used of course.

I really know a lot of Hypervisor platforms and have 15 years of experience with VMware and the likes, but never had any problems to change the display resolution via the console, even if it’s only 640×480 and a change to 800×600 is only possible, but that I am forced to change the display resolution in the UEFI-firmware and that display resolution change within Windows is no longer possible, is unique to Nutanix AHV VMs imho!

Of course, if you use RDP, the client defines the resolution, that’s not the question I originally had.

And yes, after those templates are generated (without any network connection) and completely configured for further distribution, those VMs are shutdown with sysprep and generalized!

I decided to continue to create non UEFI-firmware Windows VM-templates at the moment, because this display resolution problem is annoying. Unfortunately I am forced to transfer some Hyper-V Generation 2 VMs to Nutanix AHV and there I will try to set the default resolution to 1024×768 in UEFI-firmware, but iirc this had no effect to how the Windows setup display resolution came up, but as I am unsure, I will give it another try.

Regards,

Didi7


Ok, I continued my tests on UEFI-firmware based Windows 2016 VMs and finally found out, that display resolution in Windows 2016 VMs only changes, when changing the default resolution in UEFI-firmware and only if you enter UEFI-firmware configuration after a reboot and exit. The display resolution changes to the one you choose in UEFI-firmware.

As soon as you power off the Windows Server 2016 VM again, the display resolution returns to 1280×1024 again and cannot be changed within Windows. If you reboot (not power off) the Windows 2016 VM, enter UEFI-firmware with F2 and exit again, the display resolution changes again to the one you chose in Nutanix UEFI-firmware settings.

That’s what I call annoying and should be changed from Nutanix asap, but maybe I am the only one claiming it’s annoying, at least in our company several users find it annoying.

Any comments from Nutanix are welcome!

Regards,

Didi7


@Didi7  

I understand your concern and have tested the same in my lab on AOS 5.15 with AHV20170830.395. This indeed is a necessary feature and works well in Hyper-V and VMWare. As you have mentioned its specific to UEFI and LEGACY VMs doesn’t show the behaviour.  It’s because, to change the display resolution, legacy Graphics cards based on VGA standard exposed their helper routines via VGA BIOS. OS drivers would raise a BIOS to interrupt INT 10H for the respective VGA bios routine to be invoked, which would in turn call into the firmware helper for driving the card in a particular resolution.
With UEFI, there is no VGA. All UEFI-compliant cards provide GOP protocol handlers to drive the card accordingly for changing display resolution.
To fully implement dynamic resolution changing capabilities, the OS driver must be able to call into platform firmware (BIOS or UEFI) at runtime (using VGA or GOP). Note that in the absence of resolution change capability, the guest OS will have to inherit whatever resolution (and hence framebuffer size) the firmware had initially set for it while setting up the display device at boot.


Hi Sudhir,

interesting! Well, other Hypervisors like Hyper-V and VMware have no display resolution change problems with UEFI-VMs under Windows Server 2016.

Lets see how Nutanix can fix that!

Regards,

Didi7


is there an update you can provide on this enhancement?


Not that I know of :(

Cool!  Thanks for bringing this to their attention.  I had searched before with no real results; I guess this time I entered in the correct search words.  I went in and updated the resolution, for now, it works.


Well, you can change the resolution in the UEFI-BIOS but as soon as you power off the VM the old resolution of 1280×1024 is back.

Good luck!


Hi is there a fix for this yet? It seems to be the same with a windows 2019 datacenter server with UEFI-BIOS.

Thanks


Hi,
Nutanix should really rethink their stance on the debug-tool purpose for the console.
Using out-of-band access to a VM really helps if you do something like remote access to customers using client vpn tools.
A proper solution for the screen display resolution is more than welcome for us too.
That is the one thing vmware has the upper hand with their vmware remote console tool.


Has there been any update to this issue in 4 years since this thread started? I’m guessing not since I ended up here now searching this exact problem with UEFI and Server 2022. As Didi7 expressed 3 years ago … this is extremely annoying.

Time to put some engineering resources to work on designing a better console viewer … based on Sudhir9’s explanation. I love Nutanix, but there are little things like this still popping up occasionally, and coming from 19 years of working with VMware infrastructure, it seems crazy not to have to worked out something like this that you know engineers and admins are going to have a fit over. Bring it Nutanix!


Got the same problem with Server 2022. Really annoying that we can’t change the screen resolution :-(


I got the same problem, we have over 80 servers and all of them with the same problem, it is annoying having to scroll down to reach the task bar.


Понравилась статья? Поделить с друзьями:
0 0 голоса
Рейтинг статьи
Подписаться
Уведомить о
guest

0 комментариев
Старые
Новые Популярные
Межтекстовые Отзывы
Посмотреть все комментарии
  • Какой раздел главного меню ос windows открывает доступ к изменению конфигурации компьютера
  • Как сохранить установленные обновления windows 7
  • Windows 10 монитор ресурсов приостановлено
  • Пароль на каталог windows
  • Upgrade windows server 2008 to windows server 2012 r2