Skip to content

Instantly share code, notes, and snippets.

@bp2008
Last active January 30, 2024 22:01
Show Gist options
  • Star 36 You must be signed in to star a gist
  • Fork 10 You must be signed in to fork a gist
  • Save bp2008/922b326bf30222b51da08146746c7c27 to your computer and use it in GitHub Desktop.
Save bp2008/922b326bf30222b51da08146746c7c27 to your computer and use it in GitHub Desktop.
How to install a graphical desktop environment on Hyper-V Server 2019

Hyper-V Server 2019 GUI Installation Guide

Introduction

Hyper-V Server does not include much in the way of graphical tools, but third-party alternatives can be installed.

I found a disturbing lack of basic instructions for using Hyper-V Server 2019, so it is my hope that this guide is useful to somebody.

Before starting this guide, enable Remote Desktop support in Hyper-V Server using the built-in configuration menu. If you connect to the Hyper-V Server with Remote Desktop, it will make it easy to copy and paste text (and later, files) from a normal Windows desktop machine.

Step 1) Install Chrome

In the command prompt on the Hyper-V server, run this command:

Powershell

This loads Powershell which gives us many additional capabilities, including the ability to download files.

Find a current Chrome setup URL by downloading it in the web browser on a "normal" computer, and looking in your browser's download history. Then, back on the Hyper-V server, run this command, replacing YOUR_CHROME_SETUP_URL with the URL you found.

(New-Object System.Net.WebClient).DownloadFile("YOUR_CHROME_SETUP_URL", "ChromeSetup.exe")

(hint: to paste text in a command/powershell window, right-click)

Now exit Powershell

exit

Run ChromeSetup.exe

ChromeSetup.exe

Complete the installation using the setup GUI.

Run Chrome

"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"

Step 2) Install Cairo (3rd-party desktop environment)

In Chrome, open https://cairoshell.com/, and download the latest 64 bit Cairo installer from GitHub. When the download completes, use Chrome to launch the Cairo setup executable. I don't know if it matters, but in Cairo setup, I checked the box to Replace Explorer.

Proceed through Cairo's welcome tour. When it asks which apps you want to include in the Programs menu, make sure you add Chrome and PowerShell.

Re-launching Cairo

If you ever find that the Cairo shell isn't running when you log in, you can launch it with the command:

"C:\Program Files\Cairo Shell\CairoDesktop.exe"

Step 3) Install 7-Zip

In Chrome, open https://www.7-zip.org, then download and install 7-Zip 64-bit. I used the .exe installer.

Back in Cairo, click your Programs menu, and choose App Grabber. Add 7-Zip to your programs menu.

Run 7-Zip from the Programs menu, and in 7-Zip's options, click the plus button to associate 7-Zip with all supported file types.

Close 7-Zip.

Step 4) Install Explorer++ (3rd-party file explorer)

In Chrome, open https://explorerplusplus.com/

Download the 64 bit version.

In 7-Zip, extract Explorer++.exe to C:\Explorer++\Explorer++.exe.

In Cairo Settings (Menu button in upper-left corner), Advanced, set the File manager path to C:\Explorer++\Explorer++.exe.

Add Explorer++ to Cairo's Programs menu, similar to how you added 7-Zip earlier. You'll notice that Explorer++ does not appear as an installed application in App Grabber. Instead, you must click the Browse… button to locate Explorer++ where you extracted it.

Step 5) Install Windows Admin Center (WAC)

In Chrome, open https://aka.ms/windowsadmincenter

Download the latest stable release (I wouldn't recommend a preview version unless you have a specific reason).

Run the installer.

When you get to the part about SSL and a certificate, you can either use the self-signed option or add your own. I prefer to add my own so I can have my desktop PC trust it and no longer get browser warnings when accessing the interface via HTTPS. Add your own certificate or not, then complete the installation.

How I added my own certificate

To generate certificates, I used this tool to create a HyperV1.pfx file with my server's host name HyperV1 in the list of domain names. Then I copied and pasted the pfx file from my normal workstation, through remote desktop, to the C:\Users\Administrator\Documents folder on the Hyper-V server.

Next, I opened a PowerShell window on the Hyper-V Server, and navigated to the Documents folder.

cd "C:\Users\Administrator\Documents"

Then I used Import-PfxCertificate to import the certificate into the server's certificate store.

Import-PfxCertificate -FilePath HyperV1.pfx -CertStoreLocation Cert:\LocalMachine\My

The output conveniently includes the certificate's Thumbprint, which you can copy by selecting the thumbprint with the mouse and pressing enter. Back in the Windows Admin Center installer, I pasted this thumbprint in the appropriate text box, and proceeded with installation

Remote Management

Now that Windows Admin Center is installed, you can use it for most remote management tasks by navigating to your server's IP or host name in a web browser. To authenticate, enter the user name Administrator and the password you used when you first set up the server.

For more-advanced management, such as to pass through a physical device to a VM, it may be necessary to install Hyper-V Manager on another Windows system and connect remotely to the Hyper-V Server, which of course is a pain in the ass. https://timothygruber.com/hyper-v-2/remotely-managing-hyper-v-server-in-a-workgroup-or-non-domain/

@WaldenWoods08
Copy link

Great guide, very helpful. Thanks!!

@imamkhaira
Copy link

superb. thank you very much.

@FaberfoX
Copy link

I've used this guide in the past, I'd suggest you take a look at this, there are instructions there to get Classic Shell working in both Hyper-V and Server core. While Cairo is nice, this is a much more familiar interface.

@csenger41
Copy link

Thank you very much for this easy-to-use guide, it was really an enormous help!

@indus3
Copy link

indus3 commented Jan 18, 2022

Just a small FYI for anyone interested: the license terms for the free MS Hyper-V server 2019 do not prohibit installing software as described in this guide. It is hence perfectly legal to use this guide to create a fully compatible "windows pro" clone without the steep licensing costs. If you decide to sell computers with this setup, make sure not to charge license costs, because MS will most definitely come after you...

Good guide btw! worked nicely in a vm, will look further into things. Anyone happen to test how well this works for gaming by any chance?

@bp2008
Copy link
Author

bp2008 commented Jan 18, 2022

That is very interesting. I think there are a lot of major obstacles to getting Hyper-V server to be as functional as regular Windows. But it would be a fun project especially for a tech youtube channel.

@indus3
Copy link

indus3 commented Jan 18, 2022

I read that MS will probably not issue a hyper-v server 2022, as they are prioritizing other virtualization options. Luckily 2019 will remain supported throughout its entire lifecycle. Hopefully they'll realise that they're making a mistake in removing the free hypervisor from their assortment...

@ibay770
Copy link

ibay770 commented Aug 7, 2022

I found that chocolatey makes it much easier, you can just install it with powershell and then install the rest from powershell too

@ibay770
Copy link

ibay770 commented Aug 8, 2022

hyper v 2019-2022-08-07-19-18-30

I tried installing a bunch of stuff, some stuff like vivaldi works, start menus and other media stuff like video players, do not at the moment. Though it would be cool if people could fix those issues, then we can use it as a daily driver.

@ibay770
Copy link

ibay770 commented Aug 8, 2022

That is very interesting. I think there are a lot of major obstacles to getting Hyper-V server to be as functional as regular Windows. But it would be a fun project especially for a tech youtube channel.

True but, it would take less space then a standard install,and the server kernel is anyway optimized for speed so it would be faster.

@onfire4g05
Copy link

For anyone finding this guide, you'll probably also want the App Compatability features added more recently. It works on Hyper-V Server 2019.

Add-WindowsCapability -Online -Name ServerCore.AppCompatibility~~~~0.0.1.0

You'll get things like Device Manager, Windows Explorer, Disk Manager, etc.

@ibay770
Copy link

ibay770 commented May 7, 2023

Has anyone found a way to get audio working?

@ibay770
Copy link

ibay770 commented Jan 2, 2024

This also works on Azure HCI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment