From 045ca0963da0f7fa559d602e355c078d8fa79bd3 Mon Sep 17 00:00:00 2001 From: Jan Oehen Date: Wed, 3 Nov 2021 11:59:23 +0100 Subject: [PATCH 1/3] Adding openssl install line for M1 Macs https://automatica.com.au/2021/02/powershell-and-remote-sessions-to-office-365-microsoft-365-on-apple-silicon/ --- .../docs-conceptual/install/Installing-PowerShell-on-macOS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reference/docs-conceptual/install/Installing-PowerShell-on-macOS.md b/reference/docs-conceptual/install/Installing-PowerShell-on-macOS.md index 6691f8de3392..30af1a06d91b 100644 --- a/reference/docs-conceptual/install/Installing-PowerShell-on-macOS.md +++ b/reference/docs-conceptual/install/Installing-PowerShell-on-macOS.md @@ -225,7 +225,7 @@ if needed. [installation guide](https://www.macports.org/install.php). 1. Update MacPorts by running `sudo port selfupdate`. 1. Upgrade MacPorts packages by running `sudo port upgrade outdated`. -1. Install OpenSSL by running `sudo port install openssl10`. +1. Install OpenSSL by running `sudo port install openssl10`. (If you're running a newer Mac with Apple Silicon you need to run `sudo port install openssl10 +universal`instead.) 1. Link the libraries to make them available to PowerShell: ```sh From cd979b05d1d44e8ebc2af139169a00f80bf2bffc Mon Sep 17 00:00:00 2001 From: Jan Oehen Date: Wed, 3 Nov 2021 12:10:49 +0100 Subject: [PATCH 2/3] Formatting update to comply with style guide --- .../docs-conceptual/install/Installing-PowerShell-on-macOS.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/reference/docs-conceptual/install/Installing-PowerShell-on-macOS.md b/reference/docs-conceptual/install/Installing-PowerShell-on-macOS.md index 30af1a06d91b..fabef391aebf 100644 --- a/reference/docs-conceptual/install/Installing-PowerShell-on-macOS.md +++ b/reference/docs-conceptual/install/Installing-PowerShell-on-macOS.md @@ -225,7 +225,8 @@ if needed. [installation guide](https://www.macports.org/install.php). 1. Update MacPorts by running `sudo port selfupdate`. 1. Upgrade MacPorts packages by running `sudo port upgrade outdated`. -1. Install OpenSSL by running `sudo port install openssl10`. (If you're running a newer Mac with Apple Silicon you need to run `sudo port install openssl10 +universal`instead.) +1. Install OpenSSL by running `sudo port install openssl10`. +1. When running a newer Mac with Apple Silicon run `sudo port install openssl10 +universal` instead. 1. Link the libraries to make them available to PowerShell: ```sh From 514c3886f4afcc559320f7b10bb625eb76bce9eb Mon Sep 17 00:00:00 2001 From: Sean Wheeler Date: Tue, 16 Nov 2021 16:48:55 -0600 Subject: [PATCH 3/3] Update M1 instructions for SSL --- .../install/Installing-PowerShell-on-macOS.md | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/reference/docs-conceptual/install/Installing-PowerShell-on-macOS.md b/reference/docs-conceptual/install/Installing-PowerShell-on-macOS.md index 92a4561a6eef..efee625b865a 100644 --- a/reference/docs-conceptual/install/Installing-PowerShell-on-macOS.md +++ b/reference/docs-conceptual/install/Installing-PowerShell-on-macOS.md @@ -136,7 +136,7 @@ You can double-click the file and follow the prompts, or install it from the ter following commands. Change the name of the file to match the file you downloaded. ```sh -sudo installer -pkg powershell-7.1.5-osx-x64.pkg -target / +sudo installer -pkg powershell-7.2.0-osx-x64.pkg -target / ``` Install [OpenSSL](#installing-dependencies). OpenSSL is needed for PowerShell remoting and CIM @@ -189,19 +189,19 @@ match the version you want to install. ```sh # Download the powershell '.tar.gz' archive -curl -L -o /tmp/powershell.tar.gz https://github.com/PowerShell/PowerShell/releases/download/v7.1.5/powershell-7.1.5-osx-x64.tar.gz +curl -L -o /tmp/powershell.tar.gz https://github.com/PowerShell/PowerShell/releases/download/v7.2.0/powershell-7.2.0-osx-x64.tar.gz # Create the target folder where powershell is placed -sudo mkdir -p /usr/local/microsoft/powershell/7.1.5 +sudo mkdir -p /usr/local/microsoft/powershell/7.2.0 # Expand powershell to the target folder -sudo tar zxf /tmp/powershell.tar.gz -C /usr/local/microsoft/powershell/7.1.5 +sudo tar zxf /tmp/powershell.tar.gz -C /usr/local/microsoft/powershell/7.2.0 # Set execute permissions -sudo chmod +x /usr/local/microsoft/powershell/7.1.5/pwsh +sudo chmod +x /usr/local/microsoft/powershell/7.2.0/pwsh # Create the symbolic link that points to pwsh -sudo ln -s /usr/local/microsoft/powershell/7.1.5/pwsh /usr/local/bin/pwsh +sudo ln -s /usr/local/microsoft/powershell/7.2.0/pwsh /usr/local/bin/pwsh ``` ## Installing dependencies @@ -224,9 +224,10 @@ if needed. [installation guide](https://www.macports.org/install.php). 1. Update MacPorts by running `sudo port selfupdate`. 1. Upgrade MacPorts packages by running `sudo port upgrade outdated`. -1. Install OpenSSL by running `sudo port install openssl10`. -1. When running a newer Mac with Apple Silicon run `sudo port install openssl10 +universal` instead. -1. Link the libraries to make them available to PowerShell: +1. Install OpenSSL: + - For x64-based systems run `sudo port install openssl10` + - For M1-based systems run `sudo port install openssl10 +universal` +4. Link the libraries to make them available to PowerShell: ```sh sudo mkdir -p /usr/local/opt/openssl @@ -255,7 +256,7 @@ and remove the paths using `sudo rm`. ## Paths -- `$PSHOME` is `/usr/local/microsoft/powershell/7.1.5/` +- `$PSHOME` is `/usr/local/microsoft/powershell/7.2.0/` - User profiles are read from `~/.config/powershell/profile.ps1` - Default profiles are read from `$PSHOME/profile.ps1` - User modules are read from `~/.local/share/powershell/Modules` @@ -269,7 +270,7 @@ exists at `Microsoft.PowerShell_profile.ps1` in the same locations. PowerShell respects the [XDG Base Directory Specification][xdg-bds] on macOS. Because macOS is a derivation of BSD, the prefix `/usr/local` is used instead of `/opt`. So, -`$PSHOME` is `/usr/local/microsoft/powershell/7.1.5/`, and the symbolic link is placed at +`$PSHOME` is `/usr/local/microsoft/powershell/7.2.0/`, and the symbolic link is placed at `/usr/local/bin/pwsh`. ## Supported versions