Installing PowerShell on Windows: Step-by-Step Guide
Introduction
Providing both versatility and power, PowerShell functions as a command-line shell and scripting language specifically created to manage and automate tasks on Windows operating systems. With multiple installation methods available, you have the flexibility to pick the option that matches your requirements. Catering to various situations and workflows, this article offers a detailed walkthrough on how to install PowerShell on Windows.
The convenient feature of Winget is that it serves as a reliable tool for installing and managing various applications on Windows client devices. To install PowerShell using Winget, follow these steps:
Access a command prompt or PowerShell window.
Search for the latest version of PowerShell:
powershell
Copy code
winget search Microsoft.PowerShell
Install PowerShell or PowerShell Preview using the id parameter (adjust the command for the version you need):
powershell
Copy code
winget install –id Microsoft.PowerShell –source winget
winget install –id Microsoft.PowerShell.Preview –source winget
Installing the MSI package
The MSI package installation method is appropriate for use on Windows Servers and in professional deployment scenarios. Follow these steps to install PowerShell using the MSI package:
Obtain the MSI package for the preferred version from the PowerShell repository available on GitHub. directly from GitHub’s PowerShell repository.
64-bit version of PowerShell-7.3.6-win-x64.msi (64-bit version)
32-bit version of PowerShell-7.3.6-win-x86.msi
Give a double tap to the downloaded installer file Then, comply with the instructions to finish installing.
The default installation of PowerShell 7.3 is in a fresh directory PowerShell versions 7.3 and Windows PowerShell 5.1 coexist together.
Installing the ZIP package
The ZIP package method allows for easy installation of multiple versions. Side-loading on Windows Nano Server, Windows IoT, and Arm-based systems is beneficial. Follow these steps to install PowerShell using the ZIP package:
Acquire the ZIP bundle corresponding to the specified version from the GitHub PowerShell repository. via access to GitHub’s PowerShell repository.
The 64-bit edition of PowerShell version 7.3.6 in ZIP format
Alternative 1 Alternative C
ARM64 version (PowerShell-7.3.6-win-arm64.zip) (ARM64 version)
Decompress and transfer the files within the ZIP folder to any desired folder. to a location you prefer.
Launch PowerShell by running pwsh.exe in the custom setup location.
Install as a tool globally in .NET
If you have the .NET Core SDK installed, you can install PowerShell as a .NET Global tool using the following command:
power shell
Copy code
After installation, you can initiate PowerShell in a fresh shell by entering pwsh.
Installing PowerShell 7.3 is possible via the Microsoft Store, Moreover, you can enjoy automatic updates and effortless integration with software distribution mechanisms like Intune and Configuration Manager through the Microsoft Store. However, note the following limitations:
In its default setting, Windows Store packages operate within an application sandbox, limiting certain functionalities.
Some commands that modify the application’s root folder aren’t supported in the Microsoft Store instance of PowerShell.
Upgrading an existing installation
For a smooth transition when upgrading PowerShell, it is recommended to stick with the initial installation method. In every technique, the installation of PowerShell leads to it being located in a unique folder. at separate locations. To illustrate this point, when moving from an LTS version to a non-LTS version, it is essential to make use of the MSI package designed specifically for this updated release.
Setting up on Windows 10 IoT Enterprise, Windows 10 IoT Core deployment, and Setting up Nano Server
For Windows 10 IoT Enterprise and Windows 10 IoT Core, Incorporation of PowerShell is possible in either the shipping image or by utilizing Import-PSCoreRelease command. Regarding Nano Server, deploying PowerShell binaries can be done either offline or online.
Conclusion
With its immense capabilities, PowerShell stands as an incredibly potent utility increasing productivity and streamlining automation within Windows environments. By practicing the procedures elucidated in this tutorial, PowerShell can be installed in a manner that aligns with your specific preferences. You can also leverage its capabilities to effectively streamline the flow of your work processes. Pick the installation approach that is suitable for your particular use scenario, Start utilizing the vast possibilities offered by PowerShell in your Windows ecosystem