Install PowerShell 7 With Winget On Windows 11

This post will show you how to install PowerShell 7 with Winget on Windows 11. If you are not familiar with it, PowerShell is Microsoft’s task automation framework and scripting language.

It provides an interactive command-line interface for managing the system, but it also includes a powerful scripting environment that can be used to control both local or remote systems through its rich object model; this makes it easy for people who want to do more than just work at the keyboard!

Search

Let’s start and first search for PowerShell 7 using the Winget search command, which will show the latest PowerShell 7 stable and preview version using the command below.

If you like, you can install both versions, and they will work side by side. For production purposes, I would not recommend using the preview version.

winget search microsoft.powershell

Silent Install

The following command will install PowerShell 7 in silent mode without any prompts or confirmation from the user. This is my favourite option, and it is also handy if you are using automation toll to deploy it to users.

x
"PowerShell Code: Add Multiple DNS Records From .CSV File To DNS Server Using PowerShell – Learn IT And DevOps Daily"
winget install microsoft.powershell --silent --accept-package-agreements  --accept-source-agreements

After the installation is completed, you can go ahead and start using PowerShell 7.

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.