mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2024-11-24 03:45:30 +00: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