Última actividad 1777531034

elicro revisó este gist 1777531034. Ir a la revisión

1 file changed, 35 insertions

install-virt-wsl-and-podman-desktop.ps1(archivo creado)

@@ -0,0 +1,35 @@
1 + if (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) {
2 + Write-Host "CRITICAL ERROR: Please run this PowerShell window as Administrator." -ForegroundColor Red
3 + exit
4 + }
5 +
6 + winget install Microsoft.PowerShell --silent --accept-package-agreements --accept-source-agreements
7 +
8 + 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'))
9 +
10 +
11 + Write-Host "--- Starting Technician Environment Setup ---" -ForegroundColor Cyan
12 +
13 + Write-Host "[1/5] Enabling Hyper-V and Virtualization Features..." -ForegroundColor Yellow
14 + $features = @(
15 + "Microsoft-Hyper-V",
16 + "Microsoft-Hyper-V-Management-Clients",
17 + "Microsoft-Hyper-V-All",
18 + "Microsoft-Windows-Subsystem-Linux",
19 + "VirtualMachinePlatform"
20 + )
21 +
22 + foreach ($feature in $features) {
23 + Write-Host "Installing: $feature"
24 + dism.exe /online /enable-feature /featurename:$feature /all /norestart
25 + }
26 +
27 + wsl --update
28 +
29 + wsl --set-default-version 2
30 +
31 + wsl --update
32 +
33 + winget install RedHat.Podman --silent --accept-package-agreements --accept-source-agreements
34 +
35 + choco install podman-desktop -y
Siguiente Anterior