Skip to content

Instantly share code, notes, and snippets.

@yakoobali588
yakoobali588 / win10dockerinstallwsl2.ps1
Created November 18, 2022 13:38 — forked from chamindac/win10dockerinstallwsl2.ps1
This script automates installation of Docker Desktop on Windows 10 and uses WSL2
set-executionpolicy -scope CurrentUser -executionPolicy Bypass -Force
If (-NOT ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator))
{
# Relaunch as an elevated process:
Start-Process powershell.exe "-File",('"{0}"' -f $MyInvocation.MyCommand.Path) -Verb RunAs
exit
}
$ProgressPreference = 'SilentlyContinue'