Skip to main content This browser is no longer supported. Show
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Installing PowerShell on Windows
In this articleThere are multiple ways to install PowerShell in Windows. Each install method is designed to support different scenarios and workflows. Choose the method that best suits your needs.
Install PowerShell using Winget (recommended)Winget, the Windows Package Manager, is a command-line tool enables users to discover, install, upgrade,
remove, and configure applications on Windows client computers. This tool is the client interface to the Windows Package Manager service. The Note See the winget documentation for a list of system requirements and
install instructions. The following commands can be used to install PowerShell using the published Search for the latest version of PowerShell
Install PowerShell or PowerShell Preview using the
Installing the MSI packageTo install PowerShell on Windows, use the following links to download the install package from GitHub.
Once downloaded, double-click the installer file and follow the prompts. The installer creates a shortcut in the Windows Start Menu.
Note PowerShell 7.3 installs to a new directory and runs side-by-side with Windows PowerShell 5.1. PowerShell 7.3 is an in-place upgrade that replaces PowerShell 7.0 and lower.
If you need to run PowerShell 7.3 side-by-side with other versions, use the ZIP install method to install the other version to a different folder. Support for Microsoft Update in PowerShell 7.2 and newerPowerShell 7.2 and newer has support for Microsoft Update. When you enable this feature, you'll get the latest PowerShell 7 updates in your traditional Microsoft Update (MU) management flow, whether that's with Windows Update for Business, WSUS, Microsoft Endpoint Configuration Manager, or the interactive MU dialog in Settings. The PowerShell 7.3 MSI package includes following command-line options:
Note Enabling updates may have been set in a previous installation or manual configuration. Using For more information, see the PowerShell Microsoft Update FAQ. Install the MSI package from the command lineMSI packages can be installed from the command line allowing administrators to deploy packages without user interaction. The MSI package includes the following properties to control the installation options:
The following example shows how to silently install PowerShell with all the install options enabled.
For a full list of command-line options for Installing the ZIP packagePowerShell binary ZIP archives are provided to enable advanced deployment scenarios. Download one of the following ZIP archives from the current release page.
Depending on how you download the file you may need to unblock the file using the Use this method to install the ARM-based version of PowerShell on computers like the Microsoft Surface Pro X. For best results, install PowerShell to the to If you already have the .NET Core SDK installed, you can install PowerShell as a .NET Global tool.
The dotnet tool installer adds Installing from the Microsoft StorePowerShell 7.3 can be installed from the Microsoft Store. You can find the PowerShell release in the Microsoft Store site or in the Store application in Windows. Benefits of the Microsoft Store package:
Known limitationsBy default, Windows Store packages run in an application sandbox that virtualizes access to some filesystem and registry locations. Changes to virtualized file and registry locations do not persist outside of the application sandbox. This
sandbox all blocks any changes to the application's root folder. Any system-level configuration settings stored in The following commands need write to
For more information, see Understanding how packaged desktop apps run on Windows. Changes for PowerShell 7.2Beginning in PowerShell 7.2, the PowerShell package is now exempt from file and registry virtualization. Changes to virtualized file and registry locations now persist outside of the application sandbox. However, changes to the application's root folder are still blocked. Important You must be running on Windows build 1903 or higher for this exemption to work. Installing a preview versionPreview releases of PowerShell 7 install to Upgrading an existing installationFor best results when upgrading, you should use the same install method you used when you first installed PowerShell. Each installation method installs PowerShell in a different location. If you are not sure how PowerShell was installed, you can compare the installed location with the package information in this article. If you installed via the MSI package, that information appears in the Programs and Features Control Panel. Note When upgrading, PowerShell won't upgrade from an LTS version to a non-LTS version. It only upgrades to the latest version of that LTS. For example, from 7.2.3 to 7.2.7. To upgrade from an LTS release to a newer stable version or the next LTS, you need to install the new version with the MSI for that release. When the installed version is not an LTS version, PowerShell upgrades to the latest stable version. Deploying on Windows 10 IoT EnterpriseWindows 10 IoT Enterprise comes with Windows PowerShell, which we can use to deploy PowerShell 7.
When you set up PowerShell Remoting you get an error message and are disconnected from the device. PowerShell has to restart WinRM. Now you can connect to PowerShell 7 endpoint on device.
Deploying on Windows 10 IoT CoreWindows 10 IoT Core adds Windows PowerShell when you include IOT_POWERSHELL feature, which we can use to deploy PowerShell 7. The steps defined above for Windows 10 IoT Enterprise can be followed for IoT Core as well. For adding the latest PowerShell in the shipping image, use Import-PSCoreRelease command to include the package in the workarea and add OPENSRC_POWERSHELL feature to your image. Note For ARM64 architecture, Windows PowerShell is not added when you include IOT_POWERSHELL. So the zip based install does not work. You need to use Deploying on Nano ServerThese instructions assume that the Nano Server is a "headless" OS that has a version of PowerShell is already running on it. For more information, see the Nano Server Image Builder documentation. PowerShell binaries can be deployed using two different methods.
In both cases, you need the Windows x64 ZIP release package. Run the commands within an "Administrator" instance of PowerShell. Offline Deployment of PowerShell
Online Deployment of PowerShellDeploy PowerShell to Nano Server using the following steps.
If you want WSMan-based remoting, follow the instructions to create a remoting endpoint using the "another instance technique". PowerShell remotingPowerShell supports the PowerShell Remoting Protocol (PSRP) over both WSMan and SSH. For more information, see:
The following prerequisites must be met to enable PowerShell remoting over WSMan on older versions of Windows.
Supported versions of WindowsThe following table is a list of PowerShell releases and the versions of Windows they are supported on. These versions are supported until either the version of PowerShell reaches end-of-support or the version of Windows reaches end-of-support.
PowerShell is supported on Windows for the following processor architectures.
You can check the version that you are using by running Installation supportMicrosoft supports the installation methods in this document. There may be other third-party methods of installation available from other sources. While those tools and methods may work, Microsoft cannot support those methods. FeedbackSubmit and view feedback for Why does PowerShell keep popping up?If your computer is infected with malware, you may notice that PowerShell keeps appearing on your screen whenever the infection attempts to execute a harmful script on your computer. To be sure, you may scan your computer using Windows Security or a third-party antivirus tool.
How do I remove Windows PowerShell virus?The first and the most efficient method you should try to remove the Windows Powershell virus is to use antivirus software and malware removal tool. There is a powerful built-in feature on Windows 10 you can use – Windows Defender. You can use it to scan your computer.
Is there PowerShell Mac?To run PowerShell on Mac, you can directly download its . pkg file from Microsoft's site, or you can use Homebrew to install PowerShell. Once PowerShell is installed, you can run it by opening a Terminal window and executing the pwsh command.
Can I delete Windows PowerShell?Yes, you can uninstall Windows PowerShell if you don't use it and also, can download and install it later if you feel you need it. Microsoft Windows PowerShell is a new command-line shell and scripting language that is designed for system administration and automation.
|