From 7fb36e3bbea212f8756b2b715e9644e4c8af38a1 Mon Sep 17 00:00:00 2001 From: "Kenneth Benzie (Benie)" Date: Sat, 11 Jun 2022 11:46:37 +0100 Subject: [PATCH] Add Windows Powershell bootstrap --- bootstrap-Windows.ps1 | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 bootstrap-Windows.ps1 diff --git a/bootstrap-Windows.ps1 b/bootstrap-Windows.ps1 new file mode 100644 index 0000000..e958fff --- /dev/null +++ b/bootstrap-Windows.ps1 @@ -0,0 +1,15 @@ +# 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, generate keys and authorize them +choco install "--package-parameters=/SSHServerFeature" openssh +# TODO: Ask for email address to use +ssh-keygen.exe -t ed25519 -C "benie@infektor.net" + +# Install Windows-Terminal and Debian +choco install microsoft-windows-terminal +wsl --install --distribution Debian