From 782b1fea02d09064f2a715a5ed0c38f8db712216 Mon Sep 17 00:00:00 2001 From: Sean Wheeler Date: Wed, 11 Mar 2026 08:33:18 -0500 Subject: [PATCH 1/3] Update no-loc terms list (#12838) --- reference/docs-conceptual/community/community-support.md | 3 ++- reference/index.yml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/reference/docs-conceptual/community/community-support.md b/reference/docs-conceptual/community/community-support.md index 9324b3da32df..8f88260642c7 100644 --- a/reference/docs-conceptual/community/community-support.md +++ b/reference/docs-conceptual/community/community-support.md @@ -1,6 +1,7 @@ --- description: List of resources created for and by PowerShell users -ms.date: 03/30/2025 +ms.date: 03/10/2026 +no-loc: [Discord, Slack, Spiceworks, "Stack Overflow" ] title: PowerShell community support resources --- # Getting support from the community diff --git a/reference/index.yml b/reference/index.yml index d618669863d3..b3427d3b2468 100644 --- a/reference/index.yml +++ b/reference/index.yml @@ -11,7 +11,7 @@ metadata: author: sdwheeler ms.author: sewhee ms.date: 03/18/2025 - no-loc: [Community, Discord, Slack, Spiceworks, "Stack Overflow" ] + no-loc: [Discord, Slack, Spiceworks, "Stack Overflow" ] # highlightedContent section (optional) # Maximum of 8 items From f90167594eb3b8edd0b3213a808372acff91a2b1 Mon Sep 17 00:00:00 2001 From: Sean Wheeler Date: Wed, 11 Mar 2026 09:08:24 -0500 Subject: [PATCH 2/3] Fix accuracy of the output in examples (#12840) --- .../Get-Content.md | 30 ++++++++++--------- .../Get-Content.md | 20 ++++++------- .../Get-Content.md | 20 ++++++------- .../Get-Content.md | 20 ++++++------- 4 files changed, 46 insertions(+), 44 deletions(-) diff --git a/reference/5.1/Microsoft.PowerShell.Management/Get-Content.md b/reference/5.1/Microsoft.PowerShell.Management/Get-Content.md index 52bd66fab58e..282f4a6338be 100644 --- a/reference/5.1/Microsoft.PowerShell.Management/Get-Content.md +++ b/reference/5.1/Microsoft.PowerShell.Management/Get-Content.md @@ -2,7 +2,7 @@ external help file: Microsoft.PowerShell.Commands.Management.dll-Help.xml Locale: en-US Module Name: Microsoft.PowerShell.Management -ms.date: 01/18/2026 +ms.date: 03/11/2026 online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.management/get-content?view=powershell-5.1&WT.mc_id=ps-gethelp schema: 2.0.0 aliases: @@ -58,8 +58,8 @@ Get-Content -Path .\LineNumbers.txt ``` ```Output -This is Line 1 -This is Line 2 +This is line 1. +This is line 2. ... This is line 99. This is line 100. @@ -81,11 +81,11 @@ Get-Content -Path .\LineNumbers.txt -TotalCount 5 ``` ```Output -This is Line 1 -This is Line 2 -This is Line 3 -This is Line 4 -This is Line 5 +This is line 1. +This is line 2. +This is line 3. +This is line 4. +This is line 5. ``` ### Example 3: Get a specific line of content from a text file @@ -99,7 +99,7 @@ that content. The **TotalCount** parameter gets the first 25 lines of content. T ``` ```Output -This is Line 25 +This is line 25. ``` The `Get-Content` command is wrapped in parentheses so that the command completes before going to @@ -117,7 +117,7 @@ Get-Item -Path .\LineNumbers.txt | Get-Content -Tail 1 ``` ```Output -This is Line 100 +This is line 100. ``` This example uses the `Get-Item` cmdlet to demonstrate that you can pipe files to `Get-Content`. The @@ -132,7 +132,8 @@ to create sample content in a file named `Stream.txt`. ```powershell Set-Content -Path .\Stream.txt -Value 'This is the content of the Stream.txt file' -# Specify a wildcard to the Stream parameter to display all streams of the recently created file. +# Specify a wildcard to the Stream parameter to display all streams of the recently +# created file. Get-Item -Path .\Stream.txt -Stream * ``` @@ -171,7 +172,8 @@ This is the content of the Stream.txt file ``` ```powershell -# Use the Stream parameter of Add-Content to create a new Stream containing sample content. +# Use the Stream parameter of Add-Content to create a new Stream containing sample +# content. $addContentSplat = @{ Path = '.\Stream.txt' Stream = 'NewStream' @@ -215,7 +217,7 @@ Added a stream named NewStream to Stream.txt ``` The **Stream** parameter is a dynamic parameter of the -[FileSystem provider](../microsoft.powershell.core/about/about_filesystem_provider.md#stream-string). +[FileSystem provider](../Microsoft.PowerShell.Core/About/about_FileSystem_Provider.md#stream-string). By default `Get-Content` only retrieves data from the default, or `:$DATA` stream. **Streams** can be used to store hidden data such as attributes, security settings, or other data. They can also be stored on directories without being child items. @@ -457,7 +459,7 @@ it in single quotation marks. Single quotation marks tell PowerShell not to inte as escape sequences. For more information, see -[about_Quoting_Rules](../Microsoft.Powershell.Core/About/about_Quoting_Rules.md). +[about_Quoting_Rules](../Microsoft.PowerShell.Core/About/about_Quoting_Rules.md). ```yaml Type: System.String[] diff --git a/reference/7.4/Microsoft.PowerShell.Management/Get-Content.md b/reference/7.4/Microsoft.PowerShell.Management/Get-Content.md index cac3ab60a556..bcc647c4551f 100644 --- a/reference/7.4/Microsoft.PowerShell.Management/Get-Content.md +++ b/reference/7.4/Microsoft.PowerShell.Management/Get-Content.md @@ -2,7 +2,7 @@ external help file: Microsoft.PowerShell.Commands.Management.dll-Help.xml Locale: en-US Module Name: Microsoft.PowerShell.Management -ms.date: 01/18/2026 +ms.date: 03/11/2026 online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.management/get-content?view=powershell-7.4&WT.mc_id=ps-gethelp schema: 2.0.0 aliases: @@ -60,8 +60,8 @@ Get-Content -Path .\LineNumbers.txt ``` ```Output -This is Line 1 -This is Line 2 +This is line 1. +This is line 2. ... This is line 99. This is line 100. @@ -83,11 +83,11 @@ Get-Content -Path .\LineNumbers.txt -TotalCount 5 ``` ```Output -This is Line 1 -This is Line 2 -This is Line 3 -This is Line 4 -This is Line 5 +This is line 1. +This is line 2. +This is line 3. +This is line 4. +This is line 5. ``` ### Example 3: Get a specific line of content from a text file @@ -101,7 +101,7 @@ that content. The **TotalCount** parameter gets the first 25 lines of content. T ``` ```Output -This is Line 25 +This is line 25. ``` The `Get-Content` command is wrapped in parentheses so that the command completes before going to @@ -119,7 +119,7 @@ Get-Item -Path .\LineNumbers.txt | Get-Content -Tail 1 ``` ```Output -This is Line 100 +This is line 100. ``` This example uses the `Get-Item` cmdlet to demonstrate that you can pipe files to `Get-Content`. The diff --git a/reference/7.5/Microsoft.PowerShell.Management/Get-Content.md b/reference/7.5/Microsoft.PowerShell.Management/Get-Content.md index 27f30b59972c..d4ec09d99201 100644 --- a/reference/7.5/Microsoft.PowerShell.Management/Get-Content.md +++ b/reference/7.5/Microsoft.PowerShell.Management/Get-Content.md @@ -2,7 +2,7 @@ external help file: Microsoft.PowerShell.Commands.Management.dll-Help.xml Locale: en-US Module Name: Microsoft.PowerShell.Management -ms.date: 01/18/2026 +ms.date: 03/11/2026 online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.management/get-content?view=powershell-7.5&WT.mc_id=ps-gethelp schema: 2.0.0 aliases: @@ -60,8 +60,8 @@ Get-Content -Path .\LineNumbers.txt ``` ```Output -This is Line 1 -This is Line 2 +This is line 1. +This is line 2. ... This is line 99. This is line 100. @@ -83,11 +83,11 @@ Get-Content -Path .\LineNumbers.txt -TotalCount 5 ``` ```Output -This is Line 1 -This is Line 2 -This is Line 3 -This is Line 4 -This is Line 5 +This is line 1. +This is line 2. +This is line 3. +This is line 4. +This is line 5. ``` ### Example 3: Get a specific line of content from a text file @@ -101,7 +101,7 @@ that content. The **TotalCount** parameter gets the first 25 lines of content. T ``` ```Output -This is Line 25 +This is line 25. ``` The `Get-Content` command is wrapped in parentheses so that the command completes before going to @@ -119,7 +119,7 @@ Get-Item -Path .\LineNumbers.txt | Get-Content -Tail 1 ``` ```Output -This is Line 100 +This is line 100. ``` This example uses the `Get-Item` cmdlet to demonstrate that you can pipe files to `Get-Content`. The diff --git a/reference/7.6/Microsoft.PowerShell.Management/Get-Content.md b/reference/7.6/Microsoft.PowerShell.Management/Get-Content.md index da4e3921f8c7..6a276e8627d3 100644 --- a/reference/7.6/Microsoft.PowerShell.Management/Get-Content.md +++ b/reference/7.6/Microsoft.PowerShell.Management/Get-Content.md @@ -2,7 +2,7 @@ external help file: Microsoft.PowerShell.Commands.Management.dll-Help.xml Locale: en-US Module Name: Microsoft.PowerShell.Management -ms.date: 01/18/2026 +ms.date: 03/11/2026 online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.management/get-content?view=powershell-7.6&WT.mc_id=ps-gethelp schema: 2.0.0 aliases: @@ -60,8 +60,8 @@ Get-Content -Path .\LineNumbers.txt ``` ```Output -This is Line 1 -This is Line 2 +This is line 1. +This is line 2. ... This is line 99. This is line 100. @@ -83,11 +83,11 @@ Get-Content -Path .\LineNumbers.txt -TotalCount 5 ``` ```Output -This is Line 1 -This is Line 2 -This is Line 3 -This is Line 4 -This is Line 5 +This is line 1. +This is line 2. +This is line 3. +This is line 4. +This is line 5. ``` ### Example 3: Get a specific line of content from a text file @@ -101,7 +101,7 @@ that content. The **TotalCount** parameter gets the first 25 lines of content. T ``` ```Output -This is Line 25 +This is line 25. ``` The `Get-Content` command is wrapped in parentheses so that the command completes before going to @@ -119,7 +119,7 @@ Get-Item -Path .\LineNumbers.txt | Get-Content -Tail 1 ``` ```Output -This is Line 100 +This is line 100. ``` This example uses the `Get-Item` cmdlet to demonstrate that you can pipe files to `Get-Content`. The From 92131d93381da4d1067aaf6de8679b1955ffd733 Mon Sep 17 00:00:00 2001 From: Sean Wheeler Date: Wed, 11 Mar 2026 16:33:02 -0500 Subject: [PATCH 3/3] Fixes #12841 - Update macOS install docs and move Brew to alternate doc (#12842) * Update macOS install docs and move Brew to alternate doc * Fix links and add source build notes * Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- redir/.openpublishing.redirection.json | 5 + ...-linux.md => alternate-install-methods.md} | 125 ++++++++++------ .../install/install-powershell-on-linux.md | 28 ++-- .../install/install-powershell-on-macos.md | 135 +++++------------- reference/docs-conceptual/toc.yml | 4 +- 5 files changed, 142 insertions(+), 155 deletions(-) rename reference/docs-conceptual/install/{install-other-linux.md => alternate-install-methods.md} (60%) diff --git a/redir/.openpublishing.redirection.json b/redir/.openpublishing.redirection.json index c1a1a161abae..d65a1278b43e 100644 --- a/redir/.openpublishing.redirection.json +++ b/redir/.openpublishing.redirection.json @@ -1,5 +1,10 @@ { "redirections": [ + { + "redirect_document_id": false, + "redirect_url": "/powershell/scripting/install/alternate-install-methods", + "source_path": "../reference/docs-conceptual/install/install-other-linux.md" + }, { "redirect_document_id": false, "redirect_url": "/powershell/scripting/security/app-control/how-to-use-app-control", diff --git a/reference/docs-conceptual/install/install-other-linux.md b/reference/docs-conceptual/install/alternate-install-methods.md similarity index 60% rename from reference/docs-conceptual/install/install-other-linux.md rename to reference/docs-conceptual/install/alternate-install-methods.md index 6631e3527228..e8a98003f438 100644 --- a/reference/docs-conceptual/install/install-other-linux.md +++ b/reference/docs-conceptual/install/alternate-install-methods.md @@ -1,39 +1,79 @@ --- -description: Information about installing PowerShell on various Linux distributions -ms.date: 02/17/2026 -title: Alternate ways to install PowerShell on Linux +description: Alternate ways to install PowerShell on non-Windows platforms. +ms.date: 03/11/2026 +title: Alternate ways to install PowerShell --- -# Alternate ways to install PowerShell on Linux +# Alternate ways to install PowerShell -All packages are available on our GitHub [releases][14] page. After the package is installed, run -`pwsh` from a terminal. Run `pwsh-preview` if you installed a preview release. +There are other ways to install PowerShell on non-Windows platforms. -There are three other ways to install PowerShell on a Linux distribution: +These methods may work but aren't officially supported by Microsoft. You may be able to get support +from the PowerShell Community or the operating system vendor. For support options, see +[Community Support][08]. -- Install using a [Snap Package][11] -- Install using the [binary archives][09] -- Install as a [.NET Global tool][10] +## Install on macOS using Homebrew -## Snap Package +Homebrew is the preferred package manager for macOS. If the `brew` command isn't found, you need to +install Homebrew following [their instructions][12]. -Snaps are application packages that are easy to install, secure, cross‐platform and dependency‐free. -Snaps are discoverable and installable from the Snap Store. Snap packages are supported the same as -the distribution you're running the package on. +```bash +/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" +``` + +Once `brew` is installed, install PowerShell using the following command: + +```sh +brew install powershell +``` + +> [!NOTE] +> The brew formula builds PowerShell from source code rather than installing a package built by +> Microsoft. + +### Update PowerShell 7 + +Run the following commands to update the installed version of PowerShell to the latest release. + +```sh +brew update +brew upgrade powershell +``` + +### Uninstall PowerShell 7 + +If you installed PowerShell with Homebrew, use the following command to uninstall: + +```sh +brew uninstall powershell +``` + +If you manually installed PowerShell 7, you must manually remove it. The following command removes +the symbolic link and PowerShell files. + +```sh +sudo rm -rf /usr/local/bin/pwsh /usr/local/microsoft/powershell +``` + +Use `sudo rm` to remove any other remaining PowerShell files and folders. + +## Install on Linux using a Snap package + +Snaps are application packages that are easy to install if your platform supports Snap. You can find +and install Snap packages from the Snap Store. > [!IMPORTANT] -> The Snap Store contains PowerShell snap packages for many Linux distributions that are not -> officially supported by Microsoft. For support, see the list of available [Community Support][08] -> options. +> The Snap Store contains PowerShell snap packages for many Linux distributions that aren't +> officially supported by Microsoft. ### Getting snapd The snap daemon, known as `snapd`, is the background service that manages and maintains your snaps. It needs to be running before a snap can be installed. For instructions on how to install `snapd`, -see the [Snapcraft documentation][16]. +see the [Snapcraft documentation][14]. ### Installation via Snap -There are two PowerShell for Linux is published to the [Snap store][17]: `powershell` and +There are two PowerShell for Linux is published to the [Snap store][15]: `powershell` and `powershell-preview`. Use the following command to install the latest stable version of PowerShell: @@ -78,7 +118,11 @@ pwsh-preview After installation, Snap will automatically upgrade. You can trigger an upgrade using `sudo snap refresh powershell` or `sudo snap refresh powershell-preview`. -### Uninstallation +> [!NOTE] +> Snap packages build PowerShell from source code rather than installing a package built by +> Microsoft. + +### Uninstall using Snap ```sh sudo snap remove powershell @@ -90,7 +134,7 @@ or sudo snap remove powershell-preview ``` -## Binary Archives +## Install from binary archives PowerShell binary `tar.gz` archives are provided for Linux platforms to enable advanced deployment scenarios. @@ -98,19 +142,19 @@ scenarios. > [!NOTE] > You can use this method to install any version of PowerShell including the latest: > -> - Stable release: [https://aka.ms/powershell-release?tag=stable][14] -> - LTS release: [https://aka.ms/powershell-release?tag=lts][12] -> - Preview release: [https://aka.ms/powershell-release?tag=preview][13] +> - Stable release: [https://aka.ms/powershell-release?tag=stable][11] +> - LTS release: [https://aka.ms/powershell-release?tag=lts][09] +> - Preview release: [https://aka.ms/powershell-release?tag=preview][10] ### Dependencies -PowerShell builds portable binaries for all Linux distributions. But, .NET Core runtime requires -different dependencies on different distributions, and PowerShell does too. +PowerShell builds portable binaries for all supported Linux distributions. But, PowerShell and the +.NET runtime require different dependencies on different distributions. It's possible that when you install PowerShell, specific dependencies may not be installed, such as when manually installing from the binary archives. The following list details Linux distributions that are supported by Microsoft and have dependencies you may need to install. Check the -distribution page for more information: +Linux distribution page for more information: - [Alpine][01] - [Debian][02] @@ -119,11 +163,7 @@ distribution page for more information: - [Ubuntu][05] To deploy PowerShell binaries on Linux distributions that aren't officially supported, you need to -install the necessary dependencies for the target OS in separate steps. For example, our -[Amazon Linux dockerfile][15] installs dependencies first, and then extracts the Linux `tar.gz` -archive. - -### Installation using a binary archive file +install the necessary dependencies for the target OS in separate steps. > [!IMPORTANT] > This method can be used to install PowerShell on any version of Linux, including distributions @@ -173,9 +213,12 @@ dotnet tool install --global PowerShell ``` The dotnet tool installer adds `~/.dotnet/tools` to your `PATH` environment variable. However, the -currently running shell does not have the updated `PATH`. You should be able to start PowerShell +currently running shell doesn't have the updated `PATH`. You should be able to start PowerShell from a new shell by typing `pwsh`. +The .NET team publishes Docker images containing the .NET SDK with PowerShell already installed. You +can find those images on the [Microsoft Container Registry][13]. + [01]: /dotnet/core/install/linux-alpine#dependencies [02]: /dotnet/core/install/linux-debian#dependencies @@ -185,12 +228,10 @@ from a new shell by typing `pwsh`. [06]: /dotnet/core/sdk [07]: /dotnet/core/tools/global-tools [08]: /powershell/scripting/community/community-support -[09]: #binary-archives -[10]: #install-as-a-net-global-tool -[11]: #snap-package -[12]: https://aka.ms/powershell-release?tag=lts -[13]: https://aka.ms/powershell-release?tag=preview -[14]: https://aka.ms/PowerShell-Release?tag=stable -[15]: https://github.com/PowerShell/PowerShell-Docker/blob/master/release/unstable/amazonlinux/docker/Dockerfile -[16]: https://snapcraft.io/docs/tutorials/install-the-daemon/ -[17]: https://snapcraft.io/store +[09]: https://aka.ms/powershell-release?tag=lts +[10]: https://aka.ms/powershell-release?tag=preview +[11]: https://aka.ms/PowerShell-Release?tag=stable +[12]: https://brew.sh/ +[13]: https://mcr.microsoft.com/en-us/artifact/mar/dotnet/sdk/ +[14]: https://snapcraft.io/docs/tutorials/install-the-daemon/ +[15]: https://snapcraft.io/store diff --git a/reference/docs-conceptual/install/install-powershell-on-linux.md b/reference/docs-conceptual/install/install-powershell-on-linux.md index 36fa01179655..f4c24c6348c0 100644 --- a/reference/docs-conceptual/install/install-powershell-on-linux.md +++ b/reference/docs-conceptual/install/install-powershell-on-linux.md @@ -11,7 +11,7 @@ PowerShell. PowerShell can be installed on some distributions of Linux that aren Microsoft. In those cases, you may find support from the community for PowerShell on those platforms. -For more information, see the [PowerShell Support Lifecycle][05] documentation. +For more information, see the [PowerShell Support Lifecycle][01] documentation. This article lists the supported Linux distributions and package managers. All PowerShell releases remain supported until either the version of PowerShell or the version of the Linux distribution @@ -23,7 +23,7 @@ For the best compatibility, choose a long-term release (LTS) version. [!INCLUDE [Alpine support](../../includes/alpine-support.md)] -For more information, see [Install PowerShell on Alpine][13]. +For more information, see [Install PowerShell on Alpine][03]. ## Debian @@ -31,7 +31,7 @@ Debian uses APT (Advanced Package Tool) as a package manager. [!INCLUDE [Debian support](../../includes/debian-support.md)] -For more information, see [Install PowerShell on Debian][14]. +For more information, see [Install PowerShell on Debian][04]. ## Red Hat Enterprise Linux (RHEL) @@ -39,7 +39,7 @@ RHEL 7 uses yum and RHEL 8 uses the dnf package manager. [!INCLUDE [RHEL support](../../includes/rhel-support.md)] -For more information, see [Install PowerShell on RHEL][17]. +For more information, see [Install PowerShell on RHEL][06]. ## Ubuntu @@ -47,7 +47,7 @@ Ubuntu uses APT (Advanced Package Tool) as a package manager. [!INCLUDE [Ubuntu support](../../includes/ubuntu-support.md)] -For more information, see [Install PowerShell on Ubuntu][18]. +For more information, see [Install PowerShell on Ubuntu][07]. ## Community supported distributions @@ -61,20 +61,20 @@ To be supported by Microsoft, the Linux distribution must meet the following cri - The version of the distribution isn't an interim release or equivalent. - The PowerShell team has tested the version of the distribution. -For more information, see [Community support for PowerShell on Linux][06]. +For more information, see [Community support for PowerShell on Linux][02]. ## Alternate installation methods There are three other ways to install PowerShell on Linux, including Linux distributions that aren't officially supported. You can try to install PowerShell using the PowerShell Snap Package. You can also try deploying PowerShell binaries directly using the Linux `tar.gz` package. For more -information, see [Alternate ways to install PowerShell on Linux][15]. +information, see [Alternate ways to install PowerShell on Linux][05]. -[05]: ../PowerShell-Support-Lifecycle.md -[06]: community-support.md -[13]: install-alpine.md -[14]: install-debian.md -[15]: install-other-linux.md -[17]: install-rhel.md -[18]: install-ubuntu.md +[01]: ../PowerShell-Support-Lifecycle.md +[02]: community-support.md +[03]: install-alpine.md +[04]: install-debian.md +[05]: install/alternate-install-methods.md +[06]: install-rhel.md +[07]: install-ubuntu.md diff --git a/reference/docs-conceptual/install/install-powershell-on-macos.md b/reference/docs-conceptual/install/install-powershell-on-macos.md index e7b2c83186fd..609072f49fd8 100644 --- a/reference/docs-conceptual/install/install-powershell-on-macos.md +++ b/reference/docs-conceptual/install/install-powershell-on-macos.md @@ -1,6 +1,6 @@ --- description: How to install PowerShell on macOS -ms.date: 03/06/2026 +ms.date: 03/11/2026 title: Install PowerShell 7 on macOS --- @@ -8,7 +8,7 @@ title: Install PowerShell 7 on macOS There are multiple package versions of PowerShell 7 that can be installed. This article focuses on installing the latest stable release package. For more information about the package versions, see -the [PowerShell Support Lifecycle][22] article. +the [PowerShell Support Lifecycle][19] article. Newer versions of PowerShell 7 replace existing previous versions of PowerShell 7. Preview versions of PowerShell can be installed side-by-side with other versions of PowerShell. Newer preview @@ -17,52 +17,22 @@ with a previous version, reinstall the previous version using the binary archive ## Choose an installation method -There are several ways to install PowerShell on macOS. Homebrew is the preferred installation -method. - -### Install PowerShell 7 using Homebrew - -Homebrew is the preferred package manager for macOS. If the `brew` command isn't found, you need to -install Homebrew following [their instructions][04]. - -```bash -/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" -``` - -Once `brew` is installed, install PowerShell. - -The following command installs the latest stable release of PowerShell: - -```sh -brew install --cask powershell -``` - -If you want the LTS or Preview version of PowerShell, you can install it using Homebrew's tap -method. Select tap version you want to install: - -- `powershell/tap/powershell-lts` -- `powershell/tap/powershell-preview` - -For example, use the following command to install the Preview release: - -```sh -brew install powershell/tap/powershell-preview -``` +There are several ways to install PowerShell on macOS. ### Manually download and install the package -Download the install package from the [releases][03] page. Select the package version you want to +Download the install package from the [releases][04] page. Select the package version you want to install. - PowerShell 7.5 - - Arm64 processors - [powershell-7.5.4-arm64.pkg][12] - - x64 processors - [powershell-7.5.4-osx-x64.pkg][14] + - Arm64 processors - [powershell-7.5.4-osx-arm64.pkg][09] + - x64 processors - [powershell-7.5.4-osx-x64.pkg][11] - PowerShell 7.4 (LTS) - - Arm64 processors - [powershell-7.4.13-osx-arm64.pkg][08] - - x64 processors - [powershell-7.4.13-osx-x64.pkg][10] + - Arm64 processors - [powershell-7.4.13-osx-arm64.pkg][05] + - x64 processors - [powershell-7.4.13-osx-x64.pkg][07] - PowerShell 7.6-preview - - Arm64 processors - [powershell-7.6.0-rc1-osx-arm64.pkg][16] - - x64 processors - [powershell-7.6.0-rc1-osx-x64.pkg][18] + - Arm64 processors - [powershell-7.6.0-rc1-osx-arm64.pkg][13] + - x64 processors - [powershell-7.6.0-rc1-osx-x64.pkg][15] There are two ways to install PowerShell using the downloaded package. @@ -84,7 +54,7 @@ Install PowerShell using Finder: 1. Select the **Done** button to close the prompt. This error message comes from the Gatekeeper feature of macOS. For more information, see -[Safely open apps on your Mac - Apple Support][21]. +[Safely open apps on your Mac - Apple Support][18]. After you've tried to open the package, follow these steps: @@ -130,18 +100,18 @@ PowerShell binary `tar.gz` archives are provided for the macOS platform to enabl deployment scenarios. When you install using this method, you must also manually install any dependencies. -Download the install package from the [releases][03] page onto your Mac. Select the archive version +Download the install package from the [releases][04] page onto your Mac. Select the archive version you want to install. - PowerShell 7.4 (LTS) - - Arm64 processors - [powershell-7.4.13-osx-arm64.tar.gz][09] - - x64 processors - [powershell-7.4.13-osx-x64.tar.gz][11] + - Arm64 processors - [powershell-7.4.13-osx-arm64.tar.gz][06] + - x64 processors - [powershell-7.4.13-osx-x64.tar.gz][08] - PowerShell 7.5 - - Arm64 processors - [powershell-7.5.4-osx-arm64.tar.gz][13] - - x64 processors - [powershell-7.5.4-osx-x64.tar.gz][15] + - Arm64 processors - [powershell-7.5.4-osx-arm64.tar.gz][10] + - x64 processors - [powershell-7.5.4-osx-x64.tar.gz][12] - PowerShell 7.6-preview - - Arm64 processors - [powershell-7.6.0-rc1-osx-arm64.tar.gz][17] - - x64 processors - [powershell-7.6.0-rc1-osx-x64.tar.gz][19] + - Arm64 processors - [powershell-7.6.0-rc1-osx-arm64.tar.gz][14] + - x64 processors - [powershell-7.6.0-rc1-osx-x64.tar.gz][16] Use the following commands to install PowerShell from the binary archive. Change the download URL to match the version you want to install. @@ -180,34 +150,14 @@ run `pwsh-preview`. - Default modules are read from `$PSHOME/Modules` - PSReadLine history is recorded to `~/.local/share/powershell/PSReadLine/ConsoleHost_history.txt` -PowerShell respects the [XDG Base Directory Specification][20] on macOS. +PowerShell respects the [XDG Base Directory Specification][17] on macOS. ## Update PowerShell 7 -Run the following commands to update the installed version of PowerShell to the latest release. - -```sh - -brew update -brew upgrade powershell -``` - -> [!NOTE] -> When updating to a newer version of PowerShell, use the same method, cask or the tap, that you -> used to perform the initial install. If you use a different method, opening a new pwsh session -> continues to use the older version of PowerShell. -> -> If you decide to use different methods, there are ways to correct the issue using the -> [Homebrew link method][05]. +To update PowerShell, download the new version of the package or binary archive and install it. ## Uninstall PowerShell 7 -If you installed PowerShell with Homebrew, use the following command to uninstall: - -```sh -brew uninstall --cask powershell -``` - If you manually installed PowerShell 7, you must manually remove it. The following command removes the symbolic link and PowerShell files. @@ -225,34 +175,25 @@ Use `sudo rm` to remove any other remaining PowerShell files and folders. Microsoft supports the installation methods in this document. There may be other third-party methods of installation available from other sources. While those tools and methods may work, Microsoft -can't support those methods. - -## Additional resources - -- [Homebrew Web][04] -- [Homebrew GitHub Repository][06] -- [Homebrew-Cask][07] +can't support those methods. For more information, see [Alternate ways to install PowerShell][03]. [01]: /dotnet/core/sdk [02]: /dotnet/core/tools/global-tools -[03]: https://aka.ms/powershell-release?tag=stable -[04]: https://brew.sh/ -[05]: https://docs.brew.sh/Manpage#link-ln-options-formula -[06]: https://github.com/Homebrew -[07]: https://github.com/Homebrew/homebrew-cask -[08]: https://github.com/PowerShell/PowerShell/releases/download/v7.4.13/powershell-7.4.13-osx-arm64.pkg -[09]: https://github.com/PowerShell/PowerShell/releases/download/v7.4.13/powershell-7.4.13-osx-arm64.tar.gz -[10]: https://github.com/PowerShell/PowerShell/releases/download/v7.4.13/powershell-7.4.13-osx-x64.pkg -[11]: https://github.com/PowerShell/PowerShell/releases/download/v7.4.13/powershell-7.4.13-osx-x64.tar.gz -[12]: https://github.com/PowerShell/PowerShell/releases/download/v7.5.4/powershell-7.5.4-osx-arm64.pkg -[13]: https://github.com/PowerShell/PowerShell/releases/download/v7.5.4/powershell-7.5.4-osx-arm64.tar.gz -[14]: https://github.com/PowerShell/PowerShell/releases/download/v7.5.4/powershell-7.5.4-osx-x64.pkg -[15]: https://github.com/PowerShell/PowerShell/releases/download/v7.5.4/powershell-7.5.4-osx-x64.tar.gz -[16]: https://github.com/PowerShell/PowerShell/releases/download/v7.6.0-rc1/powershell-7.6.0-rc1-osx-arm64.pkg -[17]: https://github.com/PowerShell/PowerShell/releases/download/v7.6.0-rc1/powershell-7.6.0-rc1-osx-arm64.tar.gz -[18]: https://github.com/PowerShell/PowerShell/releases/download/v7.6.0-rc1/powershell-7.6.0-rc1-osx-x64.pkg -[19]: https://github.com/PowerShell/PowerShell/releases/download/v7.6.0-rc1/powershell-7.6.0-rc1-osx-x64.tar.gz -[20]: https://specifications.freedesktop.org/basedir/latest/ -[21]: https://support.apple.com/102445 -[22]: PowerShell-Support-Lifecycle.md +[03]: alternate-install-methods.md +[04]: https://aka.ms/powershell-release?tag=stable +[05]: https://github.com/PowerShell/PowerShell/releases/download/v7.4.13/powershell-7.4.13-osx-arm64.pkg +[06]: https://github.com/PowerShell/PowerShell/releases/download/v7.4.13/powershell-7.4.13-osx-arm64.tar.gz +[07]: https://github.com/PowerShell/PowerShell/releases/download/v7.4.13/powershell-7.4.13-osx-x64.pkg +[08]: https://github.com/PowerShell/PowerShell/releases/download/v7.4.13/powershell-7.4.13-osx-x64.tar.gz +[09]: https://github.com/PowerShell/PowerShell/releases/download/v7.5.4/powershell-7.5.4-osx-arm64.pkg +[10]: https://github.com/PowerShell/PowerShell/releases/download/v7.5.4/powershell-7.5.4-osx-arm64.tar.gz +[11]: https://github.com/PowerShell/PowerShell/releases/download/v7.5.4/powershell-7.5.4-osx-x64.pkg +[12]: https://github.com/PowerShell/PowerShell/releases/download/v7.5.4/powershell-7.5.4-osx-x64.tar.gz +[13]: https://github.com/PowerShell/PowerShell/releases/download/v7.6.0-rc1/powershell-7.6.0-rc1-osx-arm64.pkg +[14]: https://github.com/PowerShell/PowerShell/releases/download/v7.6.0-rc1/powershell-7.6.0-rc1-osx-arm64.tar.gz +[15]: https://github.com/PowerShell/PowerShell/releases/download/v7.6.0-rc1/powershell-7.6.0-rc1-osx-x64.pkg +[16]: https://github.com/PowerShell/PowerShell/releases/download/v7.6.0-rc1/powershell-7.6.0-rc1-osx-x64.tar.gz +[17]: https://specifications.freedesktop.org/basedir/latest/ +[18]: https://support.apple.com/102445 +[19]: PowerShell-Support-Lifecycle.md diff --git a/reference/docs-conceptual/toc.yml b/reference/docs-conceptual/toc.yml index d2ab761b7e97..b2ecb2f0674b 100644 --- a/reference/docs-conceptual/toc.yml +++ b/reference/docs-conceptual/toc.yml @@ -34,8 +34,8 @@ items: href: install/install-ubuntu.md - name: Community support for Linux href: install/community-support.md - - name: Alternate ways to install on Linux - href: install/install-other-linux.md + - name: Alternate ways to install PowerShell + href: install/alternate-install-methods.md - name: Install PowerShell 7 on macOS href: install/install-powershell-on-macos.md - name: Install PowerShell on Windows IoT and Nano Server