Change irm to Invoke-RestMethod

When scripting it's best to use the full function in Powershell.
This commit is contained in:
Underscore 2024-10-10 15:27:39 -07:00
parent 6a871b1feb
commit 1bc32e0aff

View File

@ -54,7 +54,7 @@ if (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]:
$script = if ($MyInvocation.MyCommand.Path) {
"& { & '$($MyInvocation.MyCommand.Path)' $argList }"
} 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" }