Files
CKS-Lessons/lab-environment/enter-lab.ps1
2026-08-27 14:03:17 +06:00

10 lines
419 B
PowerShell

$ErrorActionPreference = 'Stop'
$distribution = 'Ubuntu-24.04'
$linuxScript = (& wsl.exe --distribution $distribution --user root --exec wslpath -a "$PSScriptRoot/enter-lab.sh").Trim()
if (-not $linuxScript) { throw 'Could not locate the Linux lab entry script.' }
& wsl.exe --distribution $distribution --user root --exec bash $linuxScript
if ($LASTEXITCODE -ne 0) { throw 'Could not enter the isolated CKS lab.' }