diff options
author | mwrock <matt@mattwrock.com> | 2020-10-01 16:31:42 -0700 |
---|---|---|
committer | mwrock <matt@mattwrock.com> | 2020-10-01 16:31:42 -0700 |
commit | c811d58a84cc2b92a24b28b3557f03c4ce17b5bc (patch) | |
tree | 8297a747d40a65822eccc55c8df57fe3c3e31967 /omnibus/omnibus-test.ps1 | |
parent | 6b077d998a0c3168cb7edb19d9d70d122ecafc95 (diff) | |
download | chef-c811d58a84cc2b92a24b28b3557f03c4ce17b5bc.tar.gz |
add interpreter arg to powershell_out allowing it to call pwsh.exe
Signed-off-by: mwrock <matt@mattwrock.com>
Diffstat (limited to 'omnibus/omnibus-test.ps1')
-rw-r--r-- | omnibus/omnibus-test.ps1 | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/omnibus/omnibus-test.ps1 b/omnibus/omnibus-test.ps1 index 4384563296..b30409596a 100644 --- a/omnibus/omnibus-test.ps1 +++ b/omnibus/omnibus-test.ps1 @@ -2,7 +2,14 @@ $ErrorActionPreference = "Stop" # install chocolatey -Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) +Set-ExecutionPolicy Bypass -Scope Process -Force +[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072 +iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) + +# install powershell core +Invoke-WebRequest "https://github.com/PowerShell/PowerShell/releases/download/v7.0.3/PowerShell-7.0.3-win-x64.msi" -UseBasicParsing -OutFile powershell.msi +Start-Process msiexec.exe -Wait -ArgumentList "/package PowerShell.msi /quiet" +$env:path += ";C:\Program Files\PowerShell\7" $channel = "$Env:CHANNEL" If ([string]::IsNullOrEmpty($channel)) { $channel = "unstable" } |