# Windows: Using Windows PowerShell or PowerShell Core
# Download
Invoke-WebRequest -Uri https:
Invoke-WebRequest -Uri https:
# Verify file integrity
$FileSha = (Get-FileHash C:\Temp\bootstrap-salt.ps1).hash
$ValidatedSha = Get-Content C:\Temp\bootstrap-salt-sha256
if ("$FileSha" -eq "$ValidatedSha") {
# After verification, run Windows minion install
Write-Output "Success! Installing..."
Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope CurrentUser
C:\Temp\bootstrap-salt.ps1
Set-ExecutionPolicy -ExecutionPolicy Undefined -Scope CurrentUser
} else {
# If hash check fails, don't attempt install
Write-Error "WARNING: This file is corrupt or has been tampered with."
}