How to Install PowerShell 7 on Windows (And Actually Set It Up Right)

How to Install PowerShell 7 on Windows (And Actually Set It Up Right)

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

๋Œ“๊ธ€

Zoho IMAP Settings: The Complete Fix When Your Email Stops Syncing

Quick Summary Zoho IMAP breaks more often than it should, and the error messages are genuinely useless. The fix is usually a combination of using the right server address, enabling IMAP inside Zoho Mail's settings, and generating an app-specific password. This guide covers the exact steps for Outlook, iPhone, Thunderbird, and Android so you stop going in circles. Photo by Fotis Fotopoulos on Unsplash So your Zoho Mail stopped syncing. Emails aren't coming in, your phone shows a spinning indicator forever, or Outlook throws some vague authentication error and you have no idea what changed. Sound familiar? I've seen this exact situation probably thirty times across different clients, and every single time the person swears they didn't change anything. And honestly? They usually didn't. Zoho changed something on their end, or an app update reset a setting, or someone enabled two-factor authentication without realizing what that does to third-party mail clients. The...

Zoho Mail IMAP Configuration: Exact Settings That Work First Time

Quick Summary Getting Zoho Mail IMAP to work in Outlook or Thunderbird is not as straightforward as Zoho's docs make it sound. The port numbers, SSL settings, and app password requirements catch almost everyone off guard the first time. Here are the exact settings and steps that actually work, without the back-and-forth with support. Photo by Fotis Fotopoulos on Unsplash Last month I spent almost two hours on a Friday afternoon helping a new employee get Zoho Mail working in Outlook. Two hours. The settings look simple on paper — and honestly, they are — but there are two or three specific things that Zoho just does not make obvious, and if you miss any one of them, you get a generic authentication error that tells you absolutely nothing useful. Sound familiar? The thing is, I've set up Zoho IMAP maybe forty times across different clients and different mail apps. Outlook, Thunderbird, Apple Mail, even some third-party Android clients. And every single time, someone new come...

์ด ๋ธ”๋กœ๊ทธ ๊ฒ€์ƒ‰

Magnesium Glycinate vs Magnesium Citrate: Which One Actually Fixed My Sleep

Quick Summary I spent months trying different magnesium forms after my sleep fell apart, and the difference between glycinate and citrate is way bigger than I expected Glycinate is the gentler, slower option great for sleep and anxiety, while citrate works faster but comes with some digestive surprises nobody warns you about If you're confused about which one to take, this breaks down exactly what each form does and who should actually be using it Photo by Anshu A on Unsplash About two years ago I hit a wall. I was waking up at 3am every single night, my legs felt restless, and I was grinding my teeth so bad my jaw hurt in the morning. My doctor ran some basic labs, everything came back "normal," and I left that appointment feeling completely dismissed. A friend of mine — she's really into functional nutrition — casually mentioned that I might just be magnesium deficient. I kind of rolled my eyes at first. It sounded like one of those wellness buzzwords people throw...
↑