Updating PowerShell on Windows 11 isn’t exactly a stroll in the park, but it’s well worth the little effort for the security patches and new features. First up, open Windows Terminal—if you’re like most, you might have to suss it out in the Start menu. Just type “Windows Terminal,” right-click it and choose Run as administrator if you want to avoid any permission dramas. Sometimes, running it with admin rights makes the process go a lot smoother, with fewer errors.
Step 1: Open Windows Terminal
Click on the Start menu, type Windows Terminal in the search box, then hit Enter. If it doesn’t open straight away, try right-clicking the icon and selecting Run as administrator. Windows Terminal is a pretty handy all-in-one, combining PowerShell and Command Prompt, so it’s a good spot for command-line stuff. Running it elevated can also dodge some permission headaches.
Step 2: Check which PowerShell version you’re running
Type pwsh -v
and hit Enter. This will tell you what version you’ve got. If it shows something like 7.2 or 7.3, you’re probably up-to-date enough, but if it’s older or you’re just curious, it’s a good idea to move forward. On some setups, that command might not show a clear version, so try $PSVersionTable.PSVersion
instead for all the details.
Step 3: Install the latest PowerShell (sometimes, the preview is the way to go)
Most folks stick with the stable release, but trying out the preview isn’t a bad shout—it often has the latest features first. To install the preview version, run this command:
winget install --id Microsoft.PowerShell.Preview -e
Why use winget? Because it’s a pretty simple way to get updates on Windows 11 without faffing about with manual downloads. Just make sure Microsoft Store and winget are both up-to-date, or this might not work.
Note: If winget isn’t working, you might need to install or update it through the App Installer from the Microsoft Store.
Step 4: Fire up the new PowerShell version
Once installed, test it out with:
pwsh-preview
This should open the latest preview build. If it doesn’t launch, check your PATH environment variables or give Windows Terminal a restart and try again. Some reckon the new version can be a bit shy on the first try—rebooting can help. Windows sometimes likes to keep us on our toes.
Step 5: Make sure the update worked
Type pwsh-preview -v
again to double-check the version. If it’s still showing the old one, a quick reboot or running the command as administrator might do the trick. Also, flick through the Apps & Features list in Windows to see if PowerShell is up to date.
Tips for Updating PowerShell on Windows 11
- Make sure your internet’s working OK—it pulls from online sources via winget.
- Heaps of updates rely on your Windows being current, so keep that shiny.
- If things go pear-shaped, check Windows Update settings or run
sfc /scannow
in Command Prompt to fix any system file dramas. - Use Windows Terminal for a cleaner, more modern command-line setup.
- Stuck? Hit the Microsoft forums or GitHub issues to see if others are having similar hassles.
FAQs
What is PowerShell?
PowerShell is basically Windows’ all-in-one toolkit for scripting and automation—like a Swiss Army knife for sysadmins and power users.
Why should I bother updating?
Because newer versions come with security patches, better performance, and some shiny new features. Think of it like updating the software in your car—that’s how you keep things running smoothly and safely.
Can I do this with Command Prompt?
Technically, yeah, but it’s a lot easier with Windows Terminal using PowerShell commands. Command Prompt isn’t really designed for managing PowerShell itself.
What if the update crashes or hangs?
Check your permissions, make sure winget’s working, and ensure your internet connection’s solid. Sometimes, a quick reboot clears things up.
How often should I check for updates?
Honestly, every few months does the job, unless you’re getting lots of security alerts. Major Windows updates often bring along new PowerShell versions anyway.
Summary
- Open Windows Terminal (preferably as admin).
- Check your current PowerShell version.
- Run
winget install --id Microsoft.PowerShell.Preview -e
to nab the latest. - Type
pwsh-preview
to give it a burl. - Check it with
pwsh-preview -v
.
Conclusion
Getting PowerShell aired on Windows 11 might seem a bit tricky at first, especially with all those command lines and updates, but once you get the hang of it, it’s pretty straightforward. The main thing? Keeping PowerShell update means better security, new features, and fewer headaches down the line. Like tuning your bike before a ride, it’s a small step that makes a big difference. Hopefully, this helps save you some time and makes the process a bit less of a head-scratcher next time.