This article has not been completed yet. However, it may already contain helpful Information and therefore it has been published at this stage.
Gateway Server - Deployment (PowerShell - Way + Custom generated Cert):
Prerequisites
- Windows Domain (Setup Guide)
- A fresh Windows Server 2016 / 2019 / 2022 Core - Edition ( Download)
- Some linux based environment
Links that might be useful in this case:
- Setting up WSL2 (Windows Subsytem for Linux) on Windows 10
- Installing Windows Server Core 2019 (German Edition)
- Generating self-signed certificate files (Linux - Debian)
# Linux based certificate creation
# 10 years
openssl req -x509 -newkey rsa:4096 -sha256 -days 3650 -nodes \
-keyout cert.key -out cert.crt -extensions san -config \
<(echo "[req]";
echo distinguished_name=req;
echo "[san]";
echo subjectAltName=DNS:<fqdn>
) \
-subj "/CN=<fqdn>"
# Certificate conversion - CRT+Key = PFX
openssl pkcs12 -export -in cert.crt -inkey cert.key -out wac.pfx
Import-PfxCertificate -FilePath '<PFX -File Path>' -CertStoreLocation Cert:LocalMachine\My -Exportable -Password (ConvertTo-SecureString -String '<PFX - File Password>' -AsPlainText -Force)
Alias - Creation
# Download WAC - Setup - Files
Invoke-WebRequest -Uri "http://aka.ms/WACDownload" -OutFile "C:\Temp\WindowsAdminCenter.msi"
# Query Cert
$WacCert = Get-ChildItem -Path Cert:\LocalMachine\Root | where {$_.Subject -eq "CN=wac.<domäne>.local"}
# Change Directory
cd C:\temp
# Install Windows Admincenter (Gatewaymode)
msiexec /i WindowsAdminCenter.msi /qn /L*v C:Log.txt SME_PORT=443 SME_THUMBPRINT=$WacCert.Thumbprint SSL_CERTIFICATE_OPTION=installed
# Restart
Restart-Computer -Force
References:
Setting up WSL2 (Windows Subsytem for Linux) on Windows 10 (it-infrastructure.solutions)
https://it-infrastructure.solutions/installing-windows-server-core-2022/