How to upgrade PowerShell
If you're a Windows user, open your PowerShell and type
Write-Output 'First' && Write-Output 'Second'
Can you see the result?
If not - like in the image below - you have an older version of PowerShell
🔧 How can you upgrade #Powershell? 🔧
First of all, let's check your current version. Open a PowerShell and run
$PSVersionTable
to see your current version.
If you're like me, you have the 5.1.x installed.
Now: from my understanding, this is the last version of the "dear old" PowerShell.
That's because MS decided to release a new, cross-platform version:
🎇 PowerShell Core 🎇
PowerShell Core (now, just PowerShell) can be used on Windows, Linux, and macOS.
To install it, head to this GitHub page
locate the installer you need, and download it.
Notice that PowerShell is standalone, and can live together with the old PowerShell.
So just let the wizard run, and finally, you can have both PS installed.
Now open it and run the previous script. And... ta-dah! Both commands have been executed!
Why did I update it in the first place?
Simply: I was tired of running 3 commands to git-push my changes, so I concatenated them into a single
git add . && git commit -m "My message" && git push
➡️ I help you to improve your .NET knowledge! | Microsoft MVP
1yI don't actually use PowerShell very often. Great quick tip.