mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2024-11-14 22:55:52 -06:00
Change irm to Invoke-RestMethod
When scripting it's best to use the full function in Powershell.
This commit is contained in:
parent
6a871b1feb
commit
1bc32e0aff
@ -54,7 +54,7 @@ if (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]:
|
|||||||
$script = if ($MyInvocation.MyCommand.Path) {
|
$script = if ($MyInvocation.MyCommand.Path) {
|
||||||
"& { & '$($MyInvocation.MyCommand.Path)' $argList }"
|
"& { & '$($MyInvocation.MyCommand.Path)' $argList }"
|
||||||
} else {
|
} else {
|
||||||
"iex '& { $(irm https://github.com/ChrisTitusTech/winutil/releases/latest/download/winutil.ps1) } $argList'"
|
"iex '& { $(Invoke-RestMethod https://github.com/ChrisTitusTech/winutil/releases/latest/download/winutil.ps1) } $argList'"
|
||||||
}
|
}
|
||||||
|
|
||||||
$powershellcmd = if (Get-Command pwsh -ErrorAction SilentlyContinue) { "pwsh" } else { "powershell" }
|
$powershellcmd = if (Get-Command pwsh -ErrorAction SilentlyContinue) { "pwsh" } else { "powershell" }
|
||||||
|
Loading…
Reference in New Issue
Block a user