Chotaire Wiki

Stuff you didn't know

User Tools

Site Tools


windows-server-2019-core-cheat-sheet

Windows Server 2019 Core Cheat Sheet

Enable Remote Desktop

In cmd.exe, enter the following command to enable Remote Desktop connections for this host:

cscript %windir%\system32\scregedit.wsf /ar 0

Verify the setting with:

cscript %windir%\system32\scregedit.wsf /ar /v

Later, if you would like to disable Remote Desktop connections:

cscript %windir%\system32\scregedit.wsf /ar 1

Alternatively, Remote Desktop can also be switched on and off using sconfig.

If you install the App Compatibility FOD as well, you can easily transfer files to your Server Core instance by establishing a Remote Desktop connection with one of your local drives shared via RDP. Open explorer.exe on your Windows Server Core 2019 to see your PC's drive.

Disable Password Complexity

In a powershell, use the following commands:

secedit /export /cfg c:\secpol.cfg
(gc C:\secpol.cfg).replace("PasswordComplexity = 1", "PasswordComplexity = 0") | Out-File C:\secpol.cfg
secedit /configure /db c:\windows\security\local.sdb /cfg c:\secpol.cfg /areas SECURITYPOLICY
rm -force c:\secpol.cfg -confirm:$false

Disable Password Age Restrictions

In a powershell, use the following commands.

To disable Password Age restrictions for a single user:

Set-LocalUser -Name "Administrator" -PasswordNeverExpires 1

To disable Password Age restrictions for all users:

net accounts /maxpwage:unlimited

Add App Compatibility FOD

The App Compatibility FOD allows you to run a couple more GUI applications that would otherwise refuse to run. Also it will install a few tools you know from Desktop Experience. Download the App Compatibility FOD ISO from here: Windows Server 2019 Evaluation Center.

You might need this. This will install:

  • Microsoft Management Console (mmc.exe)
  • Event Viewer (Eventvwr.msc)
  • Performance Monitor (PerfMon.exe)
  • Resource Monitor (Resmon.exe)
  • Device Manager (Devmgmt.msc)
  • File Explorer (Explorer.exe)
  • Windows PowerShell (Powershell_ISE.exe)
  • Disk Management (Diskmgmt.msc)

Optional: If you need to mount it within Windows Server 2019, type this in a powershell:

Mount-DiskImage -ImagePath drive_letter:\folder_where_ISO_is_saved\ISO_filename.iso

To install App Compatibility FOD type this:

DISM /Online /Add-Capability /CapabilityName:"ServerCore.AppCompatibility~~~~0.0.1.0" /Source:drive_letter_of_mounted_ISO: /LimitAccess

If really necessary, you can also install Internet Explorer 11 (has a few limitations compared to Desktop Experience):

Dism /online /add-package:drive_letter_of_mounted_iso:"Microsoft-Windows-InternetExplorer-Optional-Package~31bf3856ad364e35~amd64~~.cab"

Install .NET Framework on Windows Server Core

Note: Surprise, this is already included on Hyper-V Server 2019.

  • Copy to your Windows Server Core instance (e.g. using Remote Desktop via a shared drive)
  • Run the installer using the /q flag. It is required because we do not have a full GUI.
NDP472-KB4054530-x86-x64-AllOS-ENU.exe /q /norestart

You will see absolutely no progress, so give it some time to install before you reboot or shutdown. You can get an idea by watching Task Manager (CTRL + ALT + END, then select Task Manager in a RDP session). Remember to install Windows Updates via sconfig afterwards.

Change display language

First, get the language pack DVD that is compatible with your version of Windows Server 2019. At the time of this writing, the language pack for the current release of Windows Server 2019 is available right here. Should it get outdated, hopefully Microsoft will update this document with the updated link.

In a cmd.exe as an Administrator, run the following command, then navigate to the mounted DVD and install the languages of choice:

lpksetup

Now we need to head over to Microsoft to see the table of geographical locations. Take note of the decimal value for your desired location.

In a powershell (run as Administrator), type the following command to change language and regional settings for the current user (in this example to German).

Set-Culture de-DE
Set-WinSystemLocale de-DE
Set-WinHomeLocation -GeoId 94
Set-WinUserLanguageList de-DE -Force
Set-WinUILanguageOverride de-DE

…followed by a reboot. Don't ask me why, sometimes you have to do this twice (and reboot twice) before you see actual changes. Up next, we are going to open the Control panel (requires App Compatibility FOD to be installed):

control.exe

Navigate to Clock and Region → Region and open it. Then go to Administrative → Language for non-unicode programs and click on “Change system locale…“ if that one is still not set to your language of choice.

Click on “copy settings” to see a tidy list and verify everything is set correctly. If you would like to switch this language to Welcome Screen, system accounts and new user accounts, [x] them all and click on Ok, then reboot once more.



windows-server-2019-core-cheat-sheet.txt · Last modified: 2019/04/20 16:53 by chotaire