PowerShell Installation

For completeness, instructions for installing PowerShell (PS) on various machines will be provided.

If you are using an up-to-date Windows machine, no installation is needed, and you can skip this section.

However, it is still recommended to follow along as you might learn something new.

Windows

There are several ways to install PowerShell on Windows, but Microsoft's recommended method is via Winget.

WinGet

Microsoft's package manager for Windows 10 and later versions aims to simplify software installation, updates, and management for Windows users. Winget is an open-source project offered as part of Windows' developer tools.

Winget allows users to easily search, install, and update software via the command line or a graphical interface.

The command-line tool winget is packaged as the App Installer on modern versions of Windows 11 and Windows 10.

To search for the latest version of PowerShell:

C:\>winget search Microsoft.PowerShell
Name               Id                           Version Source
---------------------------------------------------------------
PowerShell         Microsoft.PowerShell         7.4.1.0 winget
PowerShell Preview Microsoft.PowerShell.Preview 7.5.0.2 winget

To install by Id:

C:\>winget install --id Microsoft.Powershell --source winget
Found PowerShell [Microsoft.PowerShell] Version 7.4.1.0
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.Downloading https://github.com/PowerShell/PowerShell/releases/download/v7.4.1/PowerShell-7.4.1-win-x64.msi  
β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ   103 MB /  103 MB
Successfully verified installer hash
Starting package install...
Successfully installed

Linux (Ubuntu)

You can install the packaged version of PS on Ubuntu using Snapstore.

sudo snap install powershell --classic

macOS

Using Homebrew is one of the most popular methods for installation.

brew install powershell/tap/powershell

Last updated