Installing PowerShell 7

by Apr 14, 2020

PowerShell 7 is a portable app and can run side-by-side with Windows PowerShell. You just need to download and install it.

This part is easy because the PowerShell team provides an automatic installation script. With a little trick, you can download this code and tie it to a fresh new PowerShell function, making it super easy to install PowerShell 7 from the existing Windows PowerShell:

# Download installation script
$code = Invoke-RestMethod -Uri https://aka.ms/install-powershell.ps1

# Dynamically create PowerShell function
New-Item -Path function: -Name Install-PowerShell -Value $code 

# Run PowerShel function and install the latest PowerShell
Install-PowerShell -UseMSI -Preview

 


PowerShell Conference Europe (psconf.eu) opens June 2, 2020, in Hannover, Germany, and you can be part of it! 4 days, 3 tracks, 80 PowerShell sessions, and 40 renown speakers from around the world (including PowerShell inventor Jeffrey Snover, the PowerShell team with Steve Lee, the Amazon AWS team, and many more) are waiting for questions and discussions, providing authoritative firsthand information, tips and guidance for professional PowerShell scripters.

Find out more at http://powershell.one/psconfeu/psconf.eu-2020/about, download the mobile app with sessions and speakers at http://psconfeu.sessionize.com/, and secure your seat at https://psconf.eu/register.html.

Twitter This Tip! ReTweet this Tip!