How to Update PowerShell in Windows 11 and 10

Windows PowerShell is a powerful command-line shell and scripting language for automating tasks. Keeping PowerShell up-to-date is essential for accessing new features, security enhancements, and bug fixes. This article will explore how to update PowerShell in Windows 11 and 10.

Update PowerShell in Windows

Updating PowerShell to the latest version is highly recommended for several reasons. One of the most common reasons is that newer versions often come with security patches and address issues and bugs that may exist in earlier versions. With that out of the way, let’s understand what you need to know before updating Windows PowerShell.

Note: While we will demonstrate the steps on Windows 11, the steps are the same for Windows 10 as well.

Things to Know Before Upgrading PowerShell Version

Before upgrading the PowerShell version, there are several essential things to remember. 

1. Ensure that the version of PowerShell you plan to update is compatible with your operating system. Newer PowerShell versions might not be supported on older Windows versions. 

2. Review your existing scripts and modules. Updates to PowerShell might introduce breaking changes that affect your scripts’ functionality. In addition, when using third-party modules, ensure they are compatible with the updated PowerShell version.

Things to Know Before Your Update PowerShell

3. Depending on your organization’s policies, you might require administrative privileges to update PowerShell. Make sure you have the necessary permissions before attempting an update.

4. PowerShell updates can include security enhancements and fixes. Updating to the latest version can help protect your system from known vulnerabilities, so it’s a good security practice.

Considering these points and planning your update carefully will ensure a smooth transition to an updated PowerShell version. Before upgrading, you must verify the current PowerShell version you use.

Also Read: How to disable Command Prompt and Windows PowerShell

See more:  2 Best Ways to Disable Taskbar Thumbnail Preview in Windows 11

Which PowerShell Version Do You Have

Checking the version of PowerShell is pretty straightforward. Follow the below-mentioned steps.

Step 1: Press the Windows key on your keyboard, type Windows PowerShell, and click Open.

type Windows PowerShell

Step 2: Now, type the below command to update PowerShell.

$psversiontable

type the below command

That’s it. The command will throw out a lot of details. You will have the version of the PowerShell adjacent to the PSVersion. If your version is lower than the latest version (at the time of writing, 7.3.8) of PowerShell, continue reading to know how to update PowerShell to the latest version.

How to Update PowerShell to the Latest Version for Windows

There are multiple ways to update PowerShell to the latest version on your Windows 11/10. We will look at updating it directly and through the Microsoft Store. Let’s first begin with updating it using Winget.

Method 1: Quick Command to Update PowerShell

This method is the easiest way to upgrade the PowerShell version. We will use Winget, a package manager, to download and install PowerShell. You don’t need to download and go through the steps to upgrade the PowerShell version. Follow the instructions below.

Fun Fact: PowerShell is open source (via GitHub), allowing developers and system administrators to use PowerShell across different operating systems, enhancing its versatility and adoption in diverse environments.

Step 1: Press the Windows key on your keyboard, type Windows PowerShell, and click Open.

type Windows PowerShell

Step 2: Type the below command.

winget install –id Microsoft.Powershell –source winget

Note: If you want to download the beta version to test your scripts, replace ‘Microsoft.Powershell’ with ‘Microsoft.Powershell.Preview’ in the above command.

type the below command

The above command will download and install the latest version of PowerShell from Microsoft’s GitHub repository. Once downloaded and installed, close all Terminal windows and reopen them to use the new PowerShell.

Continue reading to learn another way to upgrade Windows PowerShell.

Method 2: Update PowerShell Version via MSI Package 

It is one of the most common ways to upgrade PowerShell. However, before we proceed, check your system architecture and follow the below steps.

Step 1: Go to the Microsoft official page in your preferred browser to download the MSI package.

See more:  How to Fix “A supported game is required to use this feature” on Nvidia

Note: Alternatively, you can download the latest version of PowerShell from GitHub as an .msi file.

Step 2: Scroll down and under the ‘Installing the MSI package’ section, click on ‘PowerShell-7.38-win-x64.msi’ or ‘PowerShell-7.38-win-x86.msi’ as per your system architecture.

Go to the Microsoft official page

Step 3: Once downloaded, double-click the downloaded installer file and click Next.

click Next

Step 4: Select a destination folder for your downloaded PowerShell version and click Next. 

Select a destination folder

Step 5: In the Optional Actions, customize the installation by checking the box next to the options you want to enable and clicking Next.

customize the installation

Step 6: On the next screen, check the boxes to enable PowerShell to update through the Microsoft Update service and click Next.

enable PowerShell to update

Step 7: Finally, click Install and click Yes in the pop-up confirmation. 

click Install

There you go. Once installed, you can click Finish and launch the latest PowerShell version. You can check the version by following the above method.

Method 3: Update PowerShell via the Microsoft Store

There are certain limitations to the PowerShell from the Microsoft Store, including that $pshome cannot be modified, and specific advanced cmdlets, modules, and features may be disabled or restricted. You can, however, use this for any basic cmdlet. Now that we have a clear understanding, let’s begin.

Step 1: Press the Windows key on your keyboard, type Microsoft Store, and click Open.

type Microsoft Store

Step 2: Once launched, click the Search bar at the top, type PowerShell, and choose PowerShell from the drop-down menu.

click the Search bar

Step 3: Finally, click the Get button and wait for the installation to complete.

click the Get button

Once installed, click the Open button to launch the latest version of PowerShell. You may wonder if the latest PowerShell replaces the existing one. Well, the answer is no. You can use the existing and updated ones, but how? Keep reading.

How to Open the Upgraded PowerShell Version

Step 1: Press the Windows key on your keyboard, type Windows PowerShell, and click Open.

type Windows PowerShell

Step 2: Once launched, click the chevron (arrow) icon.

click on the chevron (arrow) icon

Step 3: From the drop-down, select the version of PowerShell you want to open.

See more:  How to Fix Windows Security Showing White Screen on Windows 11

Note: Windows PowerShell is your existing version, and (just) PowerShell is the latest (updated) version.

select the version of PowerShell you want to open

That said, if you face any issues upgrading the PowerShell version, you can also check out the PowerShell documentation.

FAQs on Updating PowerShell in Windows

1. Is PowerShell automatically updated with Windows Updates?

PowerShell updates are often included in Windows Updates, but major version updates might require manual installation.

2. Can I have multiple versions of PowerShell installed on my Windows 11 computer?

Yes, you can have various versions of PowerShell installed simultaneously. This can be useful if you need to work with scripts compatible with different versions.

3. Can I revert to an older version of PowerShell if I encounter issues after updating?

In most cases, it’s possible to uninstall the updated version and reinstall an older one if needed. However, it’s advisable to back up scripts and test compatibility before updating.

4. Is updating PowerShell necessary for basic Windows 11 usage?

For basic usage, you might not need to update PowerShell. However, updating is recommended if you plan to use advanced scripting and automation features or if you want to stay up-to-date with security improvements.

Update to Do Your Command Line

Whether you want to enhance security, stability, compatibility, performance, or access enhanced features, knowing how to update PowerShell in Windows is fundamental to maintaining an efficient and secure Windows system. You may also want to learn how to run PowerShell as administrator in Windows 11.

Categories: How to
Source: thpttranhungdao.edu.vn/en/

Rate this post

Leave a Comment