$lpUser = Read-Host "Enter your Launchpad (lp) username" ################################ ## DEBLOAT WINDOWS ## ################################ & ([scriptblock]::Create((irm "https://debloat.raphi.re/"))) -RunDefaults -Silent ################################ ## INSTALL VIRTIO GUEST TOOLS ## ################################ $tempPath = Join-Path $env:TEMP "VirtIOGuestTools.exe" Invoke-WebRequest -Uri https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/archive-virtio/virtio-win-0.1.271-1/virtio-win-guest-tools.exe -OutFile $tempPath Start-Process $tempPath -ArgumentList "/quiet" -Wait ###################### ## ALLOW SSH ACCESS ## ###################### # Install the OpenSSH Server feature Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0 # Start the sshd service immediately Start-Service sshd # (Optional but smart) Set it to auto-start on boot Set-Service -Name sshd -StartupType 'Automatic' # (Optional sanity check) Get-Service -Name sshd # Add a firewall rule to allow inbound SSH traffic New-NetFirewallRule -Name sshd -DisplayName 'OpenSSH Server (sshd)' -Enabled True -Direction Inbound -Protocol TCP -Action Allow -LocalPort 22 ###################### ## IMPORT SSH KEYS ## ###################### $tempKey = [System.IO.Path]::GetTempFileName() Invoke-WebRequest -Uri "https://launchpad.net/~$lpUser/+sshkeys" -OutFile $tempKey $authorizedKey = Get-Content -Path $tempKey Set-Content -Force -Path $env:ProgramData\ssh\administrators_authorized_keys -Value $authorizedKey icacls.exe "$env:ProgramData\ssh\administrators_authorized_keys" /inheritance:r /grant "Administrators:F" /grant "SYSTEM:F" (Get-Content "C:\ProgramData\ssh\sshd_config") ` -replace '#\s*PubkeyAuthentication', 'PubkeyAuthentication' ` | Set-Content "C:\ProgramData\ssh\sshd_config" Restart-Service -Name sshd ############################## ## 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')) ############################## ## INSTALL CHOCO PACKAGES ## ############################## choco install aqt visualstudio2019buildtools visualstudio2019-workload-vctools cmake ninja qemu-img openssl -yfd aqt install-qt windows desktop 6.5.2 win64_msvc2019_64 -O C:/Qt