[CmdletBinding()] Param( [Parameter(Mandatory=$true)] [String]$email, [String]$sshKeyType = "ed25519" ) # Install Chocolatey Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1')) # Enable Hyper-V and containters Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All Enable-WindowsOptionalFeature -Online -FeatureName Containers -All # Install OpenSSH and start service choco install --yes "--package-parameters=/SSHServerFeature" openssh Start-Service sshd Set-Service -Name sshd -StartupType 'Automatic' # generate keys and authorize them ssh-keygen -t "$sshKeyType" -C "$email" -f "$env:USERPROFILE/.ssh/$sshKeyType" # TODO: authorize public key for admin # Install Windows-Terminal and Debian choco install --yes microsoft-windows-terminal wsl --install --distribution Debia