Installing PowerShell Core on Windows

MSI

To install PowerShell on a Windows client or Windows Server (works on Windows 7 SP1, Server 2008 R2, and later), download the MSI package from our GitHub releases page.

The MSI file looks like this - PowerShell-6.0.0.<buildversion>.<os-arch>.msi

Once downloaded, double-click the installer and follow the prompts.

There is a shortcut placed in the Start Menu upon installation.

  • By default the package is installed to $env:ProgramFiles\PowerShell\
  • You can launch PowerShell via the Start Menu or $env:ProgramFiles\PowerShell\pwsh.exe

Prerequisites

To enable PowerShell remoting over WSMan, the following prerequisites need to be met:

  • Install the Universal C Runtime on Windows versions prior to Windows 10. It is available via direct download or Windows Update. Fully patched (including optional packages), supported systems will already have this installed.
  • Install the Windows Management Framework (WMF) 4.0 or newer (5.1) on Windows 7 and Windows Server 2008 R2.

ZIP

PowerShell binary ZIP archives are provided to enable advanced deployment scenarios. Be noted that when using the ZIP archive, you won't get the prerequisites check as in the MSI package. So in order for remoting over WSMan to work properly on Windows versions prior to Windows 10, you need to make sure the prerequisites are met.

Deploying on Nano Server

These instructions assume that a version of PowerShell is already running on the Nano Server image and that it has been generated by the Nano Server Image Builder. Nano Server is a "headless" OS and deployment of PowerShell Core binaries can happen in two different ways:

  1. Offline - Mount the Nano Server VHD and unzip the contents of the zip file to your chosen location within the mounted image.
  2. Online - Transfer the zip file over a PowerShell Session and unzip it in your chosen location.

In both cases, you will need the Windows 10 x64 Zip release package and will need to run the commands within an "Administrator" PowerShell instance.

Offline Deployment of PowerShell Core

  1. Use your favorite zip utility to unzip the package to a directory within the mounted Nano Server image.
  2. Unmount the image and boot it.
  3. Connect to the inbox instance of Windows PowerShell.
  4. Follow the instructions to create a remoting endpoint using the another instance technique.

Online Deployment of PowerShell Core

The following steps will guide you through the deployment of PowerShell Core to a running instance of Nano Server and the configuration of its remote endpoint.

  • Connect to the inbox instance of Windows PowerShell
$session = New-PSSession -ComputerName <Nano Server IP address> -Credential <An Administrator account on the system>
  • Copy the file to the Nano Server instance
Copy-Item <local PS Core download location>\powershell-<version>-win-x64.zip c:\ -ToSession $session
  • Enter the session
Enter-PSSession $session
  • Extract the Zip file
# Insert the appropriate version.
Expand-Archive -Path C:\powershell-<version>-win-x64.zip -DestinationPath "C:\PowerShellCore_<version>"

Instructions to Create a Remoting Endpoint

PowerShell Core supports the PowerShell Remoting Protocol (PSRP) over both WSMan and SSH. For more information, see:

Artifact Installation Instructions

We publish an archive with CoreCLR bits on every CI build with AppVeyor.

CoreCLR Artifacts

  • Download zip package from artifacts tab of the particular build.
  • Unblock zip file: right-click in File Explorer -> Properties -> check 'Unblock' box -> apply
  • Extract zip file to bin directory
  • ./bin/pwsh.exe