HOW TO UPDATE POWERSHELL TO LATEST VERSION

Windows Update Powershell How to Update Powershell Install Windows Update Powershell
image by freepik

Keeping your PowerShell version up-to-date allows your scripts to make use of the latest cmdlets and features. But how is PowerShell being updated? However, PowerShell is now available in two versions: PowerShell Core 7.x and Windows PowerShell 5.1. In this essay, we discuss how to update PowerShell to the latest version and how to install Windows Update, PowerShell, and Windows Update.

Window Update Powershell

You may update PowerShell Core 7 on your Windows computer in a few different ways:

Method 1: Using the Winget Command

Introduced in Windows 10, Winget is a command-line package manager that lets you download and install software packages from a central repository. Use the Winget command-line tool to install or upgrade PowerShell Core 7 by doing the following steps:

1. Start by opening an administrator PowerShell window.

2. Type the following command to get the PowerShell versions that are available.

3. Use the following command to install the preferred version of PowerShell Core.

How to Update Powershell

PowerShell 5.1 is usually mostly preinstalled in Windows 10/11. On the other hand, Windows 11 and Windows 10 1607 and later support PowerShell 7.2.5. How to install the most recent version of PowerShell

Following a thorough analysis of the available research, we have summarized the two easy methods that function effectively for most people.

Update Powershell Version via Msi Package

1: For the majority of users, installing the MSI package for the PowerShell update is the first and best option. To do this, take the actions listed below.

The official MSI package download page may be accessed by clicking this link. In the Installing the MSI package section, scroll down and choose PowerShell-7.2.5-win-x86.msi or PowerShell-7.2.5-win-x64.msi based on your system architecture.

2: Double-click the PowerShell-7.2.5 msi installer file when it has been downloaded, then choose Next.

3: Click Next after choosing a target location for the PowerShell v7.2.5 package. The package’s default installation path, if you haven’t modified it, is C: Version of ProgramFilesPowerShell.

4: Click Next after selecting the optional actions. This is where you may personalize PowerShell’s installation.

5: The Microsoft Update service provides automatic updates for PowerShell 7.2. Enable PowerShell updates through Microsoft Update or WSUS (recommended) is an option that you may check here. Click Next.

6: To begin installing the most recent version of PowerShell, 7.2.5, click Install and then Yes in the UAC box.

7: After installation, you can choose to run the most recent version of PowerShell, 7.2.5, or click Finish.

8: Type Powershell into the Search box and choose PowerShell 7 (x64) to launch the most recent version of PowerShell. After that, you can verify if the PowerShell version is v7.2.5 by using the $PSversionTable command.

Update Powershell Version via Microsoft Store

Another easy method to upgrade PowerShell is to use the Microsoft Store. Now, the latest PowerShell version 7.2.5 can be installed from the Store. Here’s how to install it.

1: Start your computer’s Microsoft Store, type Powershell into the search bar, and choose PowerShell from the list of results.

2: After the most recent PowerShell version package shows up, choose Get and let the installation finish.

3: After installation, select Open to display the PowerShell 7.2.5 x64 pwsh.exe window as seen in the illustration below.

How to Install Window Update Powershell

Updates for Windows may be done manually or automatically using the Windows Update settings. Nevertheless, you may use PowerShell’s “PSWindowsUpdate” module to download and install missing patches using commands if you’re trying to patch a fresh installation or write a custom script to automate the procedure.

Install Window Update Powershell

To access and install window updates with PowerShell, follow these steps:

Method 1: Launch Windows Start 

Method 2: Look for PowerShell using a search engine, then right-click on the first result to choose Run as administrator.

Method3: Enter the following code and hit Enter to install the module needed to launch Windows Update:

Method 4: To confirm, type A and press Enter.

Method5: Insert the following command to check for updates with PowerShell and press Enter: Get-WindowsUpdate

Method6: Enter the following command and press Enter to install the latest Windows updates: Put-WindowsUpdate in place

Method 7: To verify, type A and hit Enter.

However, once you complete the steps, the latest cumulative updates will be downloaded and installed on your computer.

Why Should We Update to Powershell 7?

Upgrading to PowerShell 7 is highly recommended because it provides a lot of improvements over its predecessors. Here are a few strong arguments for updating:

#1. Compatibility Across Platforms.

Because PowerShell 7 is based on.NET Core, it can operate on Linux, macOS, and Windows. However, this facilitates the utilization of identical PowerShell scripts and modules on various operating systems, optimizing your workflows and boosting the effectiveness of your automation endeavours.

#2. Enhanced Functionality

Because of the.NET Core runtime that powers PowerShell 7, it performs better. However, this translates to improved overall speed, less memory use, and quicker script execution, enabling you to complete your chores more quickly.

#3. New Features and Improvements

A wide variety of new features, cmdlets, and enhancements are included in PowerShell 7, including support for ternary operators, better error messages, and improved PowerShell remoting. However, with these improvements, PowerShell 7 is now more robust, adaptable, and user-friendly.

#4. Long-Term Assistance

Since PowerShell 7 is a long-term support (LTS) release, bug fixes and updates are for longer-term purposes. However, by doing this, you can be confident that your PowerShell environment is always current, safe, and reliable.

#5. Suitable for Windows Powershell

With PowerShell 7, you may keep using your scripts and modules with Windows PowerShell with little to no changes thanks to its high degree of compatibility. However, this eases and lessens the disruption of the switch to PowerShell 7.

#6. Enhanced Security

The new -NoLogo setting, which stops potentially sensitive information from being displayed in the PowerShell console, and enhanced logging features, which let you keep an eye on and audit your PowerShell activity, are just two of the security enhancements included in PowerShell.

#7. Pipeline Parallelization

The ForEach-Object-Parallel cmdlet is new in PowerShell 7 and allows script blocks to run in parallel on many cores and threads.

#8. Additional Cmdlets and Modules

Several new cmdlets and modules are included in PowerShell 7, including the Microsoft and ConvertFrom- and ConvertTo-JSON cmdlets for working with JSON data. PowerShell. However, a module called GraphicalTools is used to create graphical user interfaces (GUIs).

Common Issues and Troubleshooting During the Upgrade Process

However, while upgrading to PowerShell 7 is generally a straightforward process, there are some common problems that users may encounter. Here are some tips for troubleshooting common issues.

#1. Installation Errors

Make sure you have completed all prerequisites, including installing.NET Core 3.1, and that you are using the appropriate installer for your system if you run into installation issues.

#2. Issues of Compatibility

If you’re having trouble getting your current scripts and modules to function properly in PowerShell 7, you may update your code by consulting the PowerShell 7 migration guide.

#3. Performance problems

Make sure you are using the most recent versions of PowerShell 7 and.NET Core and think about optimizing your scripts for parallel execution if you are experiencing performance problems, such as delayed script execution or excessive memory consumption.

#4. Security Problems

If you encounter security issues, such as unauthorized access or data breaches, access your PowerShell security settings and ensure that you are following best practices for secure scripting.

How Do I Update Powershell Help?

The Update-Help cmdlet installs the most recent PowerShell module help files on your machine by downloading and installing them. Restarting PowerShell is not necessary for the update to take effect. To read the new help files right away, use the Get-Help cmdlet. Update-Help verifies the help file version on your system.

How to Check the Powershell Version?

On Windows 10, launch a PowerShell window and type “$PSVersionTable” at the prompt to find out what version of PowerShell you are using. The PowerShell version that is currently in use will be shown next to “PSVersion.”

What Version of Powershell Should I Use?

Unless there’s a compelling need to use the 32-bit version, I advise using the 64-bit version of PowerShell on 64-bit operating systems. See Starting Windows PowerShell for details on how to launch PowerShell on different Windows versions.

Reference

Related Article

0 Shares:
Leave a Reply

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

You May Also Like
Verizon competitors
Read More

VERIZON COMPETITORS & ALTERNATIVES 2023

Table of Contents Hide Verizon Competitors#1. AT&T #2. T-Mobile #3. SprintVerizon NetworkBest Verizon Competitors#1. Vodafone#2. KORE Wireless#3. Airtel Limited#4. Millicom…