There's only one way to do this:
Invoke-WebRequest -Uri "https://github.com/PowerShell/PowerShell/releases/download/v7.0.3/PowerShell-7.0.3-win-x64.msi" -OutFile "$env:TEMP\PowerShell-7.0.3-win-x64.msi" $msifile = "$env:TEMP\PowerShell-7.0.0-win-x64.msi" $arguments = @( "/i" "`"$msiFile`"" "/passive" ) Start-Process -FilePath msiexec.exe -Wait -PassThru -ArgumentList $arguments
Keep in mind that with PowerShell 7 the ISE is no longer available, and you need to shift to VisualStudio Code.Or the preview version:
Invoke-WebRequest -Uri "https://github.com/PowerShell/PowerShell/releases/download/v7.1.0-preview.6/PowerShell-7.1.0-preview.6-win-x64.msi" -OutFile "$env:TEMP\PowerShell-7.1.0-preview.6-win-x64.msi"
$msifile = "$env:TEMP\PowerShell-7.1.0-preview.6-win-x64.msi"
$arguments = @( "/i" "`"$msiFile`"" "/passive" ) Start-Process -FilePath msiexec.exe -Wait -PassThru -ArgumentList $arguments
https://code.visualstudio.com/
Or with this oneliner:
iex "& { $(irm https://aka.ms/install-powershell.ps1) } -UseMSI"
No comments:
Post a Comment