Update samy.ps1
This commit is contained in:
6
samy.ps1
6
samy.ps1
@@ -19,11 +19,13 @@ if ($ExecutionContext.SessionState.LanguageMode -ne 'FullLanguage' -or
|
||||
if ($PSCommandPath) {
|
||||
powershell.exe -NoProfile -ExecutionPolicy Bypass -File "$PSCommandPath" @argList
|
||||
} else {
|
||||
# IMPORTANT: pass args AFTER -Command so they become $args in the downloaded script
|
||||
$bootstrap = "& { iwr 'https://samybeta.svstools.ca' -UseBasicParsing | iex }"
|
||||
|
||||
# Download -> create ScriptBlock -> INVOKE it with @args so $args survives the relaunch
|
||||
$bootstrap = "& { `$sb = [ScriptBlock]::Create((Invoke-WebRequest 'https://samybeta.svstools.ca' -UseBasicParsing).Content); & `$sb @args }"
|
||||
powershell.exe -NoProfile -ExecutionPolicy Bypass -Command $bootstrap @argList
|
||||
}
|
||||
|
||||
|
||||
exit
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user