-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGo.ps1
More file actions
13 lines (12 loc) · 682 Bytes
/
Copy pathGo.ps1
File metadata and controls
13 lines (12 loc) · 682 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
#0. Start powershell as admin
#1. Set-executionpolicy unrestricted
#2. iex "& { $(iwr https://raw.githubusercontent.com/PhilipRieck/MachineSetup/main/Go.ps1) }" | Out-Null
$TempDir = "$env:TEMP\MachineSetup"
Remove-Item $TempDir -Recurse -Force -ErrorAction SilentlyContinue
New-Item -Path $TempDir -ItemType Directory > $null
$ZipPath = "$TempDir\main.zip"
Invoke-WebRequest -Uri https://github.com/PhilipRieck/MachineSetup/archive/refs/heads/main.zip -OutFile $ZipPath
Expand-Archive -LiteralPath $ZipPath -DestinationPath $TempDir
$SetupScript = (Get-ChildItem -Path $TempDir -Filter BootstrapPwsh.ps1 -Recurse).FullName
& $SetupScript @args
Remove-Item $TempDir -Recurse -Force