Your Search Bar For Shrewd Tips

How To Install Latest Powershell Version


How To Install Latest PowerShell Version

PowerShell is a powerful scripting language and automation framework developed by Microsoft, widely used by IT professionals and developers for task automation and configuration management. Keeping your PowerShell version up to date ensures access to the latest features, security patches, and performance improvements. Whether you're using Windows, macOS, or Linux, this guide will walk you through the steps to install the latest version of PowerShell on your system.

Understanding PowerShell Versions

Before diving into the installation process, it’s helpful to understand the different versions of PowerShell available:

  • Windows PowerShell: The original version included with Windows operating systems, up to PowerShell 5.1.
  • PowerShell Core (v6.x): The cross-platform, open-source version that runs on Windows, macOS, and Linux.
  • PowerShell 7.x (PowerShell): The latest, unified version that continues from PowerShell Core, offering new features and improvements.

As of October 2023, PowerShell 7.3 is the latest stable release. It is recommended to install the latest version for the best experience and security.

Prerequisites for Installing PowerShell

Before installing PowerShell, ensure your system meets the following prerequisites:

  • Internet connection for downloading installation packages.
  • Administrator privileges on your computer to run installation commands.
  • Supported operating system versions:
    • Windows 10 (version 1809 or later)
    • Windows Server 2016 or newer
    • macOS (High Sierra 10.13 or later)
    • Linux distributions such as Ubuntu 20.04+, Debian 10+, CentOS 8+, and others.

Installing PowerShell on Windows

Windows users have two main options for installing or upgrading PowerShell: using the Microsoft Store or manually downloading the installer.

Method 1: Installing via Microsoft Store

This is the easiest and recommended way for Windows 10 and Windows 11 users:

  1. Open the Microsoft Store.
  2. Search for "PowerShell" in the store search bar.
  3. Select the "PowerShell" app from the search results.
  4. Click the Get button to download and install the latest version automatically.
  5. Once installed, launch PowerShell from the Start menu or search bar.

This method ensures automatic updates and seamless integration with Windows.

Method 2: Downloading the Installer Manually

If you prefer to manually install or need specific versions, follow these steps:

  1. Navigate to the PowerShell GitHub Releases page.
  2. Scroll through the list to find the latest stable release (e.g., PowerShell 7.3).
  3. Download the appropriate installer for your Windows version:
    • MSI Installer for Windows 10/11 (64-bit):
    • Click on the link ending with .msi (e.g., powershell-7.3.0-win-x64.msi).
  4. Once downloaded, double-click the MSI file to run the installer.
  5. Follow the on-screen prompts to complete the installation.
  6. After installation, open PowerShell from the Start menu or search bar.

Note: You may want to uninstall previous versions or Windows PowerShell if you prefer to use only the latest PowerShell.

Installing PowerShell on macOS

Mac users can install PowerShell via Homebrew or by downloading the package directly:

Method 1: Using Homebrew

  1. Open Terminal.
  2. Ensure Homebrew is installed. If not, install it by running:
    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  3. Update Homebrew:
    brew update
  4. Install PowerShell:
    brew install --cask powershell
  5. Once installed, launch PowerShell by typing:
    pwsh

Method 2: Downloading the Package

  1. Visit the PowerShell GitHub Releases page.
  2. Download the latest .pkg installer file for macOS.
  3. Open the downloaded file and follow the installation prompts.
  4. Launch PowerShell from the Applications folder or Spotlight search by typing pwsh.

Installing PowerShell on Linux

Linux users can install PowerShell via package managers specific to their distribution. Here are common methods for popular distributions:

Ubuntu 20.04 and Later

  1. Open Terminal.
  2. Download and install the Microsoft repository GPG keys:
    wget -q https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb
    sudo dpkg -i packages-microsoft-prod.deb
    
  3. Update the package list:
    sudo apt-get update
  4. Install PowerShell:
    sudo apt-get install -y powershell
  5. Start PowerShell:
    pwsh

CentOS 8 and RHEL 8

  1. Register the Microsoft repository:
    sudo rpm -Uvh https://packages.microsoft.com/config/centos/8/packages-microsoft-prod.rpm
  2. Install PowerShell:
    sudo dnf install -y powershell
  3. Launch PowerShell:
    pwsh

Verifying the Installation

After installing PowerShell, it’s important to verify the installation and confirm you are running the latest version:

  1. Open PowerShell by typing pwsh in your terminal or command prompt.
  2. Check the version by running:
    $PSVersionTable.PSVersion

The output should display the version number, such as 7.3.0. If it matches the latest release, you have successfully installed the newest PowerShell version.

Keeping PowerShell Up to Date

Regular updates are essential for security and performance. Here’s how to keep PowerShell current:

  • For Windows users installing via Microsoft Store, updates are automatic.
  • For manual installations, revisit the GitHub releases page periodically to download newer versions.
  • On Linux and macOS, update via your package manager or repeat the installation process with the latest package.

Additional Tips and Best Practices

  • Always back up your scripts and configurations before updating PowerShell.
  • Test new versions in a controlled environment before deploying widely.
  • Join the PowerShell community forums for updates, scripts, and support.
  • Enable automatic updates where possible to ensure you are always on the latest release.

Keeping your PowerShell environment updated ensures you benefit from the latest features, security patches, and improved stability. Whether you're on Windows, macOS, or Linux, the installation process is straightforward and ensures you can continue to automate and manage your systems efficiently. Follow the steps outlined in this guide, and you'll be up and running with the latest PowerShell version in no time.

Happy scripting!


Disclaimer: Articles are written by Humans, AI or Both. Verify Important information.

Shrewdnia

Shrewdnia

Shrewdnia is a destination for curious minds seeking clarity, knowledge, and informed perspectives. Through insightful articles and practical guides our passionate team explores a wide range of topics designed to help readers understand the world around them, make smarter decisions, and stay informed in an ever-changing landscape.


πŸ’‘ Every question sparks discovery, and every perspective enriches the conversation. Share your thoughts and insights in the comments πŸ‘‡

Back to blog

Leave a comment

JOIN THE SHREWDNIA COMMUNITY FORUM

What do you think?

Have an opinion, experience, or question about this topic? Join the Shrewdnia Forum and share your thoughts with other readers.

Join the Forum β†’