From dc281ea9b63c53591fea0ebddd327d8bb993efaf Mon Sep 17 00:00:00 2001 From: Sean Wheeler Date: Wed, 4 Mar 2020 11:40:26 -0800 Subject: [PATCH] Update install notes for SxS with PS6 --- .../Installing-PowerShell-Core-on-Linux.md | 23 +++++++++++---- .../Installing-PowerShell-Core-on-Windows.md | 28 +++++++++++++------ .../Installing-PowerShell-Core-on-macOS.md | 27 ++++++++++++------ .../whats-new/What-s-New-in-PowerShell-70.md | 14 ++++------ 4 files changed, 62 insertions(+), 30 deletions(-) diff --git a/reference/docs-conceptual/install/Installing-PowerShell-Core-on-Linux.md b/reference/docs-conceptual/install/Installing-PowerShell-Core-on-Linux.md index 63a77bf76f89..66365b267975 100644 --- a/reference/docs-conceptual/install/Installing-PowerShell-Core-on-Linux.md +++ b/reference/docs-conceptual/install/Installing-PowerShell-Core-on-Linux.md @@ -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 @@ -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 @@ -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 diff --git a/reference/docs-conceptual/install/Installing-PowerShell-Core-on-Windows.md b/reference/docs-conceptual/install/Installing-PowerShell-Core-on-Windows.md index d27727445fbe..69710e4947b5 100644 --- a/reference/docs-conceptual/install/Installing-PowerShell-Core-on-Windows.md +++ b/reference/docs-conceptual/install/Installing-PowerShell-Core-on-Windows.md @@ -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: @@ -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--win-.msi` - Once downloaded, double-click the installer and follow the prompts. @@ -41,6 +33,17 @@ The installer creates a shortcut in the Windows Start Menu. - By default the package is installed to `$env:ProgramFiles\PowerShell\` - You can launch PowerShell via the Start Menu or `$env:ProgramFiles\PowerShell\\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 @@ -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 diff --git a/reference/docs-conceptual/install/Installing-PowerShell-Core-on-macOS.md b/reference/docs-conceptual/install/Installing-PowerShell-Core-on-macOS.md index 55f51b2eb8c6..562764d29c6d 100644 --- a/reference/docs-conceptual/install/Installing-PowerShell-Core-on-macOS.md +++ b/reference/docs-conceptual/install/Installing-PowerShell-Core-on-macOS.md @@ -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 @@ -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 diff --git a/reference/docs-conceptual/whats-new/What-s-New-in-PowerShell-70.md b/reference/docs-conceptual/whats-new/What-s-New-in-PowerShell-70.md index 1b87aac5bb4e..40e222ea91c4 100644 --- a/reference/docs-conceptual/whats-new/What-s-New-in-PowerShell-70.md +++ b/reference/docs-conceptual/whats-new/What-s-New-in-PowerShell-70.md @@ -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