Danny Moran

How to install PowerShell 7 on Windows Server

Published December 16, 2023 by Danny Moran

Table of Contents
PAGE CONTENT

Introduction

Learn how to install PowerShell 7 on Windows Server and how to execute scripts using either PowerShell 7 or PowerShell 5. In this example, I show you how to download the PowerShell 7 MSI, go through the installer options, and then how you can execute PowerShell scripts using the newly installed PowerShell 7.

Video

Downloads

Installation

  1. Go to the download page linked above and download the PowerShell 7 installation files.

    Note: I recommend using the MSI installation package.

  2. Copy the MSI installation package to the local server.

  3. Right-click the installation MSI package and press Install.

  4. Select Next on the welcome page of the installation wizard.

  5. Enter the installation directory and press Next.

    Note: I recommend leaving this as the default of C:\Program Files\PowerShell\.

  6. Select the optional installation settings and then press Next.

    • Add PowerShell to Path Environment Variables: This is enabled by default.

      This setting adds the PowerShell 7 application to the %PATH% environment so that you can run pwsh.exe from the commandline without having the PowerShell 7 executable in that file location.

    • Register Windows Event Logging Manifest: This is enabled by default.

      This setting enables logging to the Windows event log.

    • Enable PowerShell remoting: This is disabled by default.

      This setting enables PowerShell remoting.

    • Disable Telemetry: This is disabled by default.

      This setting stops telemetry information from being sent to Microsoft.

    • Add ‘Open here’ context menus to Explorer: This is disabled by default.

      This setting enables a PowerShell 7 terminal to be easily opened by right-clicking anywhere in Explorer and selecting open in PowerShell 7.

    • Add ‘Run with PowerShell 7’ context menu for PowerShell files: This is disabled by default.

      This setting enables you to right-click .ps1 files and execute them from Explorer easily.

  7. Select the automatic update options that you want to use and then press Next.

    • Enable updaing PowerShell 7 through Microsoft UPdate or WSUS (recommended)
    • Use Microsoft Update when I check for updates (recommended)

    Note: I recommend leaving these settings as default (which is enabled).

  8. Select Install to start the installation process.

  9. Once the installation has finished, select Finish to close the wizard.

  10. PowerShell 7 is now installed.