Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@ the OS in separate steps.
All packages are available on our GitHub [releases][] page. After the package is installed, run
`pwsh` from a terminal. Run `pwsh-preview` if you installed a [Preview release](#installing-preview-releases).

> [!NOTE]
> PowerShell 7 is an in-place upgrade that removes PowerShell Core 6.x.
>
> The `/usr/local/microsoft/powershell/6` folder is replaced by `/usr/local/microsoft/powershell/7`.
>
> If you need to run PowerShell 6 side-by-side with PowerShell 7, reinstall PowerShell 6 using the
> [binary archive](#binary-archives) method.

[u16]: #ubuntu-1604
[u1804]: #ubuntu-1804
[u1810]: #ubuntu-1810
Expand All @@ -35,12 +43,6 @@ All packages are available on our GitHub [releases][] page. After the package is
[snap]: #snap-package
[tar]: #binary-archives

> [!TIP]
> If you already have the [.NET Core SDK](/dotnet/core/sdk) installed, it’s easy to install PowerShell as a [.NET Global tool](/dotnet/core/tools/global-tools).
>
> ```
> dotnet tool install --global PowerShell
> ```

## Installing Preview Releases

Expand Down Expand Up @@ -717,6 +719,15 @@ sudo ~/powershell/pwsh -c New-Item -ItemType SymbolicLink -Path "/usr/bin/pwsh"
rm -rf ~/powershell
```

## Install as a .NET Global tool

If you already have the [.NET Core SDK](/dotnet/core/sdk) installed, it's easy to install PowerShell
as a [.NET Global tool](/dotnet/core/tools/global-tools).

```
dotnet tool install --global PowerShell
```

## Binary Archives

PowerShell binary `tar.gz` archives are provided for Linux platforms to enable advanced deployment
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,6 @@ ms.date: 08/06/2018

There are multiple ways to install PowerShell Core in Windows.

> [!TIP]
> If you already have the [.NET Core SDK](/dotnet/core/sdk) installed, it’s easy to install PowerShell as a [.NET Global tool](/dotnet/core/tools/global-tools).
>
> ```
> dotnet tool install --global PowerShell
> ```

## Prerequisites

To enable PowerShell remoting over WSMan, the following prerequisites need to be met:
Expand All @@ -32,7 +25,6 @@ and later), download the MSI package from our GitHub [releases][releases] page.
may need to click to expand it.

The MSI file looks like this - `PowerShell-<version>-win-<os-arch>.msi`
<!-- TODO: should be updated to point to the Download Center as well -->

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

Expand All @@ -41,6 +33,17 @@ The installer creates a shortcut in the Windows Start Menu.
- By default the package is installed to `$env:ProgramFiles\PowerShell\<version>`
- You can launch PowerShell via the Start Menu or `$env:ProgramFiles\PowerShell\<version>\pwsh.exe`

> [!NOTE]
> PowerShell 7 installs to a new directory and runs side-by-side with Windows PowerShell 5.1. For
> PowerShell Core 6.x, PowerShell 7 is an in-place upgrade that removes PowerShell Core 6.x.
>
> - PowerShell 7 is installed to `%programfiles%\PowerShell\7`
> - The `%programfiles%\PowerShell\7` folder is added to `$env:PATH`
> - The `%programfiles%\PowerShell\6` folder is deleted
>
> If you need to run PowerShell 6 side-by-side with PowerShell 7, reinstall PowerShell 6 using the
> [ZIP install](#zip) method.

### Administrative install from the command line

MSI packages can be installed from the command line. This allows administrators to deploy packages
Expand Down Expand Up @@ -183,6 +186,15 @@ Nano Server and the configuration of its remote endpoint.
- If you want WSMan-based remoting, follow the instructions to create a remoting endpoint using the
["another instance technique"](../learn/remoting/WSMan-Remoting-in-PowerShell-Core.md#executed-by-another-instance-of-powershell-on-behalf-of-the-instance-that-it-will-register).

## Install as a .NET Global tool

If you already have the [.NET Core SDK](/dotnet/core/sdk) installed, it's easy to install PowerShell
as a [.NET Global tool](/dotnet/core/tools/global-tools).

```
dotnet tool install --global PowerShell
```

## How to create a remoting endpoint

PowerShell Core supports the PowerShell Remoting Protocol (PSRP) over both WSMan and SSH. For more
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,20 @@ PowerShell Core supports macOS 10.12 and higher.
All packages are available on our GitHub [releases][] page.
After the package is installed, run `pwsh` from a terminal.

> [!TIP]
> If you already have the [.NET Core SDK](/dotnet/core/sdk) installed, it’s easy to install PowerShell as a [.NET Global tool](/dotnet/core/tools/global-tools).
> [!NOTE]
> PowerShell 7 is an in-place upgrade that removes PowerShell Core 6.x.
>
> The `/usr/local/microsoft/powershell/6` folder is replaced by `/usr/local/microsoft/powershell/7`.
>
> ```
> dotnet tool install --global PowerShell
> ```
> If you need to run PowerShell 6 side-by-side with PowerShell 7, reinstall PowerShell 6 using the
> [binary archive](#binary-archives) method.

## About Brew

[Homebrew][brew] is the preferred package manager for macOS.
If the `brew` command is not found, you need to install Homebrew following [their instructions][brew].
Otherwise you may install PowerShell via [Direct Download](#installation-via-direct-download) or from [Binary Archives](#binary-archives).
[Homebrew][brew] is the preferred package manager for macOS. If the `brew` command is not found, you
need to install Homebrew following [their instructions][brew]. Otherwise you may install PowerShell
via [Direct Download](#installation-via-direct-download) or from
[Binary Archives](#binary-archives).

## Installation of latest stable release via Homebrew on macOS 10.12 or higher

Expand Down Expand Up @@ -105,6 +107,15 @@ sudo installer -pkg powershell-6.2.0-osx-x64.pkg -target /

Install [OpenSSL](#install-openssl). OpenSSL is needed for PowerShell remoting and CIM operations.

## Install as a .NET Global tool

If you already have the [.NET Core SDK](/dotnet/core/sdk) installed, it's easy to install PowerShell
as a [.NET Global tool](/dotnet/core/tools/global-tools).

```
dotnet tool install --global PowerShell
```

## Binary Archives

PowerShell binary `tar.gz` archives are provided for the macOS platform
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,17 +61,15 @@ For more up-to-date information about supported operating systems and support li
PowerShell 7 installs to a new directory and runs side-by-side with Windows PowerShell 5.1. For
PowerShell Core 6.x, PowerShell 7 is an in-place upgrade that removes PowerShell Core 6.x.

- Windows PowerShell 5.1 : `C:\Windows\System32\WindowsPowerShell\v1.0` will add
`%programfiles%\PowerShell\7`
- PowerShell 7 is installed to `%programfiles%\PowerShell\7`
- The `%programfiles%\PowerShell\7` folder is added to `$env:PATH`

PowerShell 7 will upgrade previous versions of PowerShell Core 6.x:
The PowerShell 7 installer packages upgrade previous versions of PowerShell Core 6.x:

- PowerShell Core 6.x on Windows: `%programfiles%\PowerShell\6` is replaced by
`%programfiles%\PowerShell\7`
- Linux: `/opt/microsoft/powershell/6` is replaced by
`/opt/microsoft/powershell/7`
- macOS: `/usr/local/microsoft/powershell/6` is replaced by
`/usr/local/microsoft/powershell/7`
`%programfiles%\PowerShell\7`
- Linux: `/opt/microsoft/powershell/6` is replaced by `/opt/microsoft/powershell/7`
- macOS: `/usr/local/microsoft/powershell/6` is replaced by `/usr/local/microsoft/powershell/7`

> [!NOTE]
> In Windows PowerShell, the executable to launch PowerShell is named `powershell.exe`. In version 6
Expand Down