This week’s One-Liner is brought to you by no other than Steve Lee. I can’t take credit for it, but want to make sure others see it. The only caveat is that it needs to be run in an elevated session.
Invoke-Expression "& { $(Invoke-RestMethod 'https://aka.ms/install-powershell.ps1') } –useMSI -Quiet"
It does what you think it does… installs PowerShell 7, using the MSI and silently. I’ve used it before many times and works great. There are also many other switches you can which I’ve linked to the GitHub below.
A few are:
Daily
DoNotOverwrite
AddtoPath
Preview
Try it out, and let me know what you think!
GitHub:
One-Liner
Leave a Reply