Photo by Markus Spiske on Unsplash
So I was helping a junior sysadmin on my team last week and watched him spend 45 minutes trying to figure out why his PowerShell scripts kept throwing weird errors — cross-platform stuff, pipeline behavior that didn't match the docs. Turns out he was running Windows PowerShell 5.1 the whole time and had no idea PowerShell 7 was even a separate thing. Different engine. Different capabilities. And yeah, a whole separate installation.
If that sounds familiar, this post is for you. Installing PowerShell 7 takes about five minutes once you know what you're doing, but there are a few gotchas that'll trip you up if you go in blind.
First, Understand What You're Actually Installing
Here's the thing a lot of people miss — PowerShell 7 isn't an upgrade to the PowerShell that ships with Windows. It's a completely separate application built on .NET Core (now just .NET), which means it runs side-by-side with Windows PowerShell 5.1. You won't break anything by installing it. Both versions live happily on the same machine. PowerShell 5.1 stays at C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe while PS7 installs to C:\Program Files\PowerShell\7\pwsh.exe.
That distinction matters more than people realize. Some older modules still only work properly on 5.1, so you'll probably end up using both depending on the task.
The Fastest Way to Install It
Honestly, the cleanest method is using winget. If you're on Windows 10 (build 1809 or later) or Windows 11, you've got it. Just open a regular PowerShell or Command Prompt window and run:
winget install --id Microsoft.PowerShell --source winget
That's it. It'll pull the latest stable release, handle the installer silently, and you're done. No hunting around the GitHub releases page, no clicking through a wizard.
If winget isn't available for some reason — maybe you're on a locked-down enterprise machine — you can use the MSI installer from the official GitHub repo, or run this one-liner which downloads and installs directly:
iex "& { $(irm https://aka.ms/install-powershell.ps1) } -UseMSI"
I've used that script on dozens of machines and it's never let me down. It pulls the latest stable MSI, runs it with default options, and cleans up after itself.
Setting Up Windows Terminal to Use PS7 by Default
Alright so here's where most guides just stop, and then people are left launching PowerShell 7 by hunting for "pwsh" in the Start menu like animals. Don't do that. Set it as your default in Windows Terminal.
Open Windows Terminal, hit Ctrl + , to open Settings, then go to Startup → Default Profile and switch it to PowerShell (the one that says version 7 or just "PowerShell" without the "Windows" prefix). If you want to do it the nerdy way through the JSON settings file, hit Ctrl + Shift + , and find the defaultProfile key, then set its value to match the GUID of your PS7 profile.
Once that's set, every new terminal window drops you straight into PS7. Small thing, makes a big difference day to day.
Verify the Installation Actually Worked
Open a new terminal and run:
$PSVersionTable
You want to see PSVersion showing 7.x.x and PSEdition showing Core. If you still see Desktop edition, you're in Windows PowerShell. Close and reopen your terminal, or explicitly run pwsh to launch the right one.
Two Insider Tricks Worth Knowing
First one: update PowerShell 7 from inside PowerShell 7. Once it's installed, you don't need to go back to winget or manually download anything. Just run:
iex "& { $(irm https://aka.ms/install-powershell.ps1) }"
It detects that PS7 is already there and updates it in place. I've got this aliased in my profile so I can just type Update-PS whenever I want. Speaking of which — set up a PowerShell profile if you haven't already. Your profile file lives at $PROFILE (just type that variable in PS7 and it'll show you the path). Create it if it doesn't exist and drop your aliases, custom functions, and module imports in there. Every session inherits it automatically.
Second trick: if you're managing remote machines and want to use PS7's remoting features instead of the old WinRM-based stuff, look into SSH-based remoting. PowerShell 7 supports it natively and it's genuinely better than WinRM once you've got SSH set up on your targets. The setup is a bit involved, but Microsoft's docs on PowerShell remoting over SSH walk through it clearly. Worth an afternoon.
One Thing That Catches People Off Guard
Module compatibility. Not every PowerShell module works in PS7 out of the box. The Active Directory module is a classic example — it's a Windows PowerShell module and sometimes needs compatibility mode to work in PS7. If you're hitting "module not found" errors on stuff that definitely worked in 5.1, try importing with the -UseWindowsPowerShell flag:
Import-Module ActiveDirectory -UseWindowsPowerShell
It's not a perfect solution (there are some edge cases), but it covers 90% of scenarios. The PowerShell team has a compatibility layer built in specifically for this, and it's pretty solid in practice.
Anyway, the whole process from zero to working PS7 environment takes maybe 10 minutes if you follow the winget route and spend a couple of minutes configuring Terminal. If you've been avoiding it because it seemed like a hassle, it really isn't — and the improvements in error handling, pipeline behavior, and cross-platform support are genuinely worth it. Hope this saves you some time.
Related: PowerShell 7 Download, Setup, and Commands You'll Actually Use Every Day
๋๊ธ
๋๊ธ ์ฐ๊ธฐ