Installing GUI on Windows Server Core

In our past post We explained how we prepare standard client virtual machines and demonstrated how we created a standard image using our new Ultralight plan for 120 rubles as an example. Windows Server 2019 Core.

Our support team has been receiving requests for how to work with Server 2019 Core without the usual graphical shell. We decided to demonstrate how to work with Windows Server 2019 Core and how to install GUI on it.

Installing GUI on Windows Server Core

Do not repeat this on working machines, do not use Server Core as a desktop, disable RDP, secure your information system, security is the main feature of the “Core” installation.

In one of our next articles we will look at the program compatibility table with Windows Server Core. In this article, we'll cover how to install the shell.

Shell by third-party means

Installing GUI on Windows Server Core

1. Complicated but most economical way

Server Core does not have the familiar explorer.exe out of the box, to make life easier for us, we will download explorer++. It replaces everything that the original explorer can do. Only explorer++ was considered, but almost any file manager will do, including Total Commander, FAR Manager and others.

Downloading files.

First, we need to upload the file to the server. This can be done via SMB (shared folder), Windows Admin Center and Invoke-WebRequest, it works with the -UseBasicParsing option.

Invoke-WebRequest -UseBasicParsing -Uri 'https://website.com/file.exe' -OutFile C:UsersAdministratorDownloadsfile.exe

Where -hate is the URL of the file, and -OutFile is the full path to download it, specifying the file extension and

Using Powershell:

Create a new folder on the server:

New-Item -Path 'C:OurCoolFiles' -ItemType Directory

Sharing the shared folder:

New-SmbShare -Path 'C:OurCoolFiles' -FullAccess Administrator 
-Name OurCoolShare

On your PC, the folder is connected as a network drive.

Installing GUI on Windows Server Core
Through the Windows Admin Center creates a new folder by selecting the item in the menu.

Installing GUI on Windows Server Core

Go to the shared folder and click the send button, select the file.

Installing GUI on Windows Server Core
Adding a shell to the scheduler.

If you don't want to start the shell manually every time you log in, then you need to add it to the task scheduler.

$A = New-ScheduledTaskAction -Execute "C:OurCoolFilesexplorer++.exe"
$T = New-ScheduledTaskTrigger -AtLogon
$P = New-ScheduledTaskPrincipal "localAdministrator"
$S = New-ScheduledTaskSettingsSet
$D = New-ScheduledTask -Action $A -Principal $P -Trigger $T -Settings $S
Register-ScheduledTask StartExplorer -InputObject $D

Without a scheduler, you can run via CMD:

CD C:OurCoolFilesExplorer++.exe

Method 2. Launch native Explorer

Installing GUI on Windows Server Core
Remember, no GUI

Server Core App Compatibility Feature on Demand (FOD), will return to the system: MMC, Eventvwr, PerfMon, Resmon, Explorer.exe and even Powershell ISE. More details can be found on MSDN. It does not expand the existing set of roles and features.

Launch Powershell and enter the following command:

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

Then restart the server:

Restart-Computer

Installing GUI on Windows Server Core

After that, you can even run Microsoft Office, but you will lose about 200 megabytes of RAM forever, even if there are no active users on the system.

Installing GUI on Windows Server Core
Windows Server 2019 with Features on Demand installed

Installing GUI on Windows Server Core
Windows Server 2019 CORE

That's all for now. In the next article, we'll look at the program compatibility table with Windows Server Core.

Installing GUI on Windows Server Core

Source: habr.com

Buy reliable hosting for sites with DDoS protection, VPS VDS servers 🔥 Buy reliable website hosting with DDoS protection, VPS VDS servers | ProHoster