Installing the GUI on Windows Server Core

In our last post, we talked about how we prepare standard client virtual machines and showed using the example of our new tariff with Ultralight windows vds for 99 rubles how we created a standard image of Windows Server 2019 Core.



The support service began to receive requests how to work with Server 2019 Core without the usual graphical shell. We decided to show how to work with Windows Server 2019 Core and how to install a GUI on it.







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 will cover how to install a shell.



Third-party shell







1. The most difficult, but most economical way



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



Download files.



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



Invoke-WebRequest -UseBasicParsing -Uri 'https://website.com/file.exe' -OutFile C:\Users\Administrator\Downloads\file.exe
      
      







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



Using Powershell:



On the server, create a new folder:



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





We share the shared folder:



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





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









Through the Windows Admin Center, create a new folder by selecting an item in the menu.







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









Add a shell to the scheduler.



If you do not want to start the shell manually at each login, then you need to add it to the task scheduler.



 $A = New-ScheduledTaskAction -Execute "C:\OurCoolFiles\explorer++.exe" $T = New-ScheduledTaskTrigger -AtLogon $P = New-ScheduledTaskPrincipal "local\Administrator" $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 through CMD:



 CD C:\OurCoolFiles\Explorer++.exe
      
      





Method 2. Launch the native Explorer





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. He does not expand the existing set of roles and components.



Launch Powershell and enter the following command:



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





Then reboot the server:



 Restart-Computer
      
      









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





Windows Server 2019 with installed Features on Demand





Windows Server 2019 CORE



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






All Articles