Skip to content

How to update PowerShell

Brock Bingham candid headshot
Brock Bingham|July 10, 2024
Illustration of block with Powershell logo
Illustration of block with Powershell logo

There are a lot of different ways to update PowerShell. And that’s a good thing because it means you’ve got options. In this article, we cover several different methods to update PowerShell. Whether you prefer the terminal, a manual process, or a fully automated approach, we’ve got a method for you.

Now if I could just get some better options in the vending machines …

Windows PowerShell 5.1 vs. PowerShell 7.x

PowerShell comes in a couple different varieties these days and it’s important to understand the difference between them.

Windows PowerShell version 5.1

Windows PowerShell is the original version of PowerShell. Windows PowerShell, built on .NET Framework and using the Windows Management Framework (WMF), is included with Windows and Windows Server operating systems, making it the most common version of PowerShell. However, it’s no longer being actively developed, meaning it won’t receive new features going forward.

The final version of Windows PowerShell is version 5.1, which is included with Windows 10 and higher, and Windows Server 2016 and higher.

Since Windows PowerShell is not being actively developed, we won’t focus on it.

PowerShell version 7.x

PowerShell, formally known as PowerShell Core, is open source, multiplatform, and built on .NET, formerly known as .NET Core. PowerShell is in active development and receives a steady stream of updates. As of this writing, the latest version of PowerShell is 7.4.3.

While Microsoft continues to confound users with their convoluted naming gymnastics, hopefully this information clears up some of the confusion around the differences between Windows PowerShell and PowerShell.

How to manually update PowerShell

You can manually install updates for PowerShell by downloading and running the latest PowerShell MSI. This is the preferred update method for Windows Server. The hardest part about this whole process is finding the right installer. But that’s what I’m here for.

Once you’ve downloaded the MSI package, you’re ready to install it.

  1. Launch the PowerShell 7.x installer.

  2. Click Next.

  3. Set your install directory. I recommend sticking with the default destination unless you have a specific need to change it. Click Next.

  4. Select your optional actions. I recommend selecting all the options, but don’t let me tell you how to live your life. Click Next.

    Selecting PowerShell installation options.

  5. Select whether or not you want PowerShell to automatically update via Microsoft Update or WSUS. We’ll dive more into these update methods in the next section. Click Next.

  6. Click Install. If you receive a User Account Control (UAC) prompt, click Yes.

When the installation finishes, we can launch a PowerShell window and run $PSVersionTable to return the PowerShell version number and ensure the update was successful. On my test computer, I went from version 7.4.2 to version 7.4.3.

Using the built in PowerShell variable $PSVersionTable to display what version of PowerShell you're running.

This method really feels geared towards stubborn people like me who enjoy reminiscing about the good old days. And while I’m reminiscing, let me toss out an obligatory “get off my lawn!” Now I feel at peace.

How to update PowerShell with Microsoft Update

You can update PowerShell 7.2 and higher with Microsoft Update. To use this method, you need to ensure Receive updates for other Microsoft products when you update Windows is enabled. Here’s how to update PowerShell with Windows updates.

  1. Right-click on the Windows Start button, then click Settings.

  2. On Windows 10, click Update & Security. On Windows 11, click Windows Update.

  3. Click Advanced options.

  4. Enable Receive updates for other Microsoft products.

    Enable receive updates for other Microsoft products.

Here’s what the update process looks like in the Windows Update settings page. Note that this was updating PowerShell 7.4.1 to version 7.4.2.

Windows Update downloading PowerShell udpate.

This option is turned on by default when you enable the automatic updates options during the PowerShell MSI installation. See step 5 of the previous section, “How to manually update PowerShell” for more details.

Microsoft Update works well and is a very hands-off approach, but you are at the mercy of Microsoft’s release schedule. You may not receive a new PowerShell update until it’s been available for a couple of weeks.

How to update PowerShell with winget

Winget, the client interface of the Windows Package Manager, is a powerful command-line tool built into Windows OS that can install and update PowerShell. If you are updating PowerShell for yourself and you haven’t already automated the process, winget is probably the fastest and easiest way to do it. And if you know anything about me, you know that fastest and easiest are two of my favorite words. And no, it’s not because I’m lazy — alright, it’s because I’m lazy.

Here’s how to use winget to update PowerShell.

  1. Launch a PowerShell or Command Prompt window.

  2. Enter the command winget search Microsoft.PowerShell to see what version of PowerShell is currently available. You may be prompted to accept a terms-of-use agreement. If so, enter Y.

    Updating PowerShell with winget.

  3. If a newer version of PowerShell is available, enter the command winget install –id Microsoft.PowerShell –source winget.

  4. Winget should identify the newer version and install it.

The only downside to using winget is that it’s not supported on current versions of Windows Server OS. However, Windows Server 2025 should come with winget installed by default, so definitely keep this script in your back pocket.

How to automate PowerShell updates with PDQ Connect

If you’re tired of manually updating PowerShell, PDQ Connect makes it simple to automate PowerShell updates. This is a great solution if you manage devices and need to keep PowerShell up to date on dozens, hundreds, or even thousands of endpoints. For my sysadmin peeps out there, this is the way (said in a very Mandalorian tone).

Before we dive into the tutorial, let me show you how I have my groups in Connect configured. I have four PowerShell groups:

  • PowerShell Installed

  • PowerShell Latest

  • PowerShell Not Installed

  • PowerShell Old

Custom PowerShell group sin PDQ Connect.

Since these groups are dynamic, devices are automatically assigned to them if they match the filters. These custom groups make it easy to identify which devices need PowerShell installed and which need PowerShell updated. While I recommend using all of these groups, the only one that I highly recommend to help you follow this guide is the PowerShell Old group. Here are the filters you’ll need:

  • Software | Name | Contains | PowerShell

  • Software | Versions | is less than | $(AppVerPowerShell7)

PDQ Connect custom group filters.

(Note: You can ignore the first ATLA filter. That’s just to keep my test environment organized. Also, the last filter uses a variable that represents the latest version number of PowerShell, which at the time of this writing is 7.4.3.)

Check out our PDQ Connect getting started series if you want to learn more about custom groups and variables.

Now that you know how my groups are configured, let’s look at how to install PowerShell with PDQ Connect.

  1. Launch PDQ Connect.

  2. Click the Packages tab.

  3. In the search field, type PowerShellto filter the results.

  4. Select the PowerShell 7 package. This package is built and maintained by PDQ, meaning we automatically update it for you when a new version is released.

  5. Click Deploy.

    Deploy the latest version of PowerShell with PDQ Connect.

  6. Enter the names of the devices or the device groups you want to install PowerShell on, then click Deploy. Notice that you can choose a specific update of the package to deploy if you want.

    Select the correct PowerShell version in PDQ Connect.

In the example above, I deployed the package to my custom group called PowerShell Not Installed. Notice that I now have three devices with the latest PowerShell version installed and one device running an older version of PowerShell.

Custom PowerShell groups in PDQ Connect.

Now it’s time to configure our automation, which will ensure that devices running an old version of PowerShell get updated.

  1. Click the Automation tab.

  2. Click Create automation.

  3. Enter PowerShell for the name of the automation.

  4. Select the PowerShell 7 package and ensure the Latest version is selected.

    Adding packages to automations in PDQ Connect.

  5. Select the Automatic or the Recurring automation trigger. I’m using the Recurring trigger for this example but use whichever better suits your needs.

    1. Automatic: This trigger deploys the latest version of PowerShell to the target devices/groups as soon as a new version of the PowerShell package is available. It also immediately deploys the package to devices when they join a targeted group.

    2. Recurring: This trigger deploys the latest version of PowerShell according to a schedule you configure.

  6. If you choose Recurring, configure your deployment schedule. I’ve set up my automation to run every Friday at 4 p.m.

    Configuring automation schedules in PDQ Connect.

  7. Lastly, in the Deploy tofield, add your PowerShell Old group as the target.

    Adding targets to PDQ Connect automations.

With the automation configured, PDQ Connect takes care of the rest and keeps your devices running PowerShell updated automatically.

If you haven’t tried PDQ Connect yet, take it for a spin with a free trial and see how easy device management can be. Since Connect is an agent-based solution, it can manage both on-prem and remote devices with ease.

How to automate PowerShell updates with PDQ Deploy & Inventory

If you don’t need to manage remote devices, PDQ Deploy & Inventory make automating PowerShell updates super easy. Because Inventory includes tons of prebuilt dynamic collections (including PowerShell collections), we don’t have to worry about creating those ourselves.

Here’s how to update PowerShell with PDQ Deploy & Inventory.

  1. In PDQ Deploy, click Package Library.

  2. In the filter field, type PowerShell.

  3. Select the PowerShell 7 package, then click Download Selected (As Auto Download).

    Downloading the PowerShell package from the Package Library in PDQ Deploy.

  4. Click the New Schedule button.

  5. Name your schedule PowerShell.

  6. Click the Triggers tab.

  7. Select the automation triggers you want to use. I’ll use the Weekly trigger to match the previous example.

  8. Configure your schedule.

    Creating a deployment schedule in PDQ Deploy.

  9. Click the Targets tab.

  10. Click Choose Targets > PDQ Inventory > Collection.

    Adding targets to a deployment schedule in PDQ Deploy.

  11. Expand Collection Library > Runtimes > PowerShell > PowerShell 7, then select the PowerShell 7 (Old) collection. Click OK.

  12. Click the Packages tab.

  13. If the PowerShell package isn’t listed, click Attach Packages and select it.

    Attach the PowerShell package to the deployment schedule in PDQ Deploy.

  14. Select the Options tab, then make sure Stop deploying to targets once they succeed is selected.

    Select deployment options in PDQ Deploy.

  15. Click OK to save the schedule.

Packages from the Package Library are maintained by PDQ. When a new version of PowerShell is available, PDQ updates the package so you don’t have to. It’s kind of like magic, but instead of person with a top hat, it’s a bunch of PDQ sysadmins wearing cool PDQ shirts keeping things updated behind the scenes.

PDQ Deploy & Inventory is an agentless solution that specializes in on-prem device management. Try it for free and learn what true automation looks like.

So many options, so little time

Keeping PowerShell updated is important because it ensures you’ve got access to the latest features and keeps you safe from potential vulnerabilities.

While I recommend automating tedious tasks like this, I can’t blame you if doing things the old-fashioned way gives you that nostalgic kick you’re craving. Take your method of choice and run with it.

Now if you’ll excuse me, I’m going to go stare at the vending machine and potentially shake it a bit.

Brock Bingham candid headshot
Brock Bingham

Born in the '80s and raised by his NES, Brock quickly fell in love with everything tech. With over 15 years of IT experience, Brock now enjoys the life of luxury as a renowned tech blogger and receiver of many Dundie Awards. In his free time, Brock enjoys adventuring with his wife, kids, and dogs, while dreaming of retirement.

Related articles