Skip to content
Merged
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 @@ -85,14 +85,14 @@ brew cask upgrade powershell-preview
## Installation via Direct Download

Download the PKG package
`powershell-6.1.0-osx-x64.pkg`
`powershell-6.2.0-osx-x64.pkg`
from the [releases][] page onto your macOS machine.

You can double-click the file and follow the prompts,
or install it from the terminal:

```sh
sudo installer -pkg powershell-6.1.0-osx-x64.pkg -target /
sudo installer -pkg powershell-6.2.0-osx-x64.pkg -target /
```

Install [OpenSSL](#install-openssl). OpenSSL is needed for PowerShell remoting and CIM operations.
Expand All @@ -106,19 +106,19 @@ to enable advanced deployment scenarios.

```sh
# Download the powershell '.tar.gz' archive
curl -L -o /tmp/powershell.tar.gz https://github.com/PowerShell/PowerShell/releases/download/v6.1.0/powershell-6.1.0-osx-x64.tar.gz
curl -L -o /tmp/powershell.tar.gz https://github.com/PowerShell/PowerShell/releases/download/v6.2.0/powershell-6.2.0-osx-x64.tar.gz

# Create the target folder where powershell will be placed
sudo mkdir -p /usr/local/microsoft/powershell/6.1.0
sudo mkdir -p /usr/local/microsoft/powershell/6.2.0

# Expand powershell to the target folder
sudo tar zxf /tmp/powershell.tar.gz -C /usr/local/microsoft/powershell/6.1.0
sudo tar zxf /tmp/powershell.tar.gz -C /usr/local/microsoft/powershell/6.2.0

# Set execute permissions
sudo chmod +x /usr/local/microsoft/powershell/6.1.0/pwsh
sudo chmod +x /usr/local/microsoft/powershell/6.2.0/pwsh

# Create the symbolic link that points to pwsh
sudo ln -s /usr/local/microsoft/powershell/6.1.0/pwsh /usr/local/bin/pwsh
sudo ln -s /usr/local/microsoft/powershell/6.2.0/pwsh /usr/local/bin/pwsh
```

Install [OpenSSL](#install-openssl). OpenSSL is needed for PowerShell remoting and CIM operations.
Expand All @@ -145,7 +145,7 @@ To install OpenSSL, run `brew install openssl`.

1. Install the [XCode command line tools](#install-xcode-command-line-tools).
1. Install MacPorts.
If you need instructions, refer to the
If you need instructions, refer to the
[installation guide](https://guide.macports.org/chunked/installing.macports.html).
1. Update MacPorts by running `sudo port selfupdate`.
1. Upgrade MacPorts packages by running `sudo port upgrade outdated`.
Expand Down Expand Up @@ -179,7 +179,7 @@ and remove the paths using `sudo rm`.

## Paths

* `$PSHOME` is `/usr/local/microsoft/powershell/6.1.0/`
* `$PSHOME` is `/usr/local/microsoft/powershell/6.2.0/`
* User profiles will be read from `~/.config/powershell/profile.ps1`
* Default profiles will be read from `$PSHOME/profile.ps1`
* User modules will be read from `~/.local/share/powershell/Modules`
Expand All @@ -193,7 +193,7 @@ So the default host-specific profile exists at `Microsoft.PowerShell_profile.ps1
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/6.1.0/`, and the symbolic link is placed at `/usr/local/bin/pwsh`.
So, `$PSHOME` is `/usr/local/microsoft/powershell/6.2.0/`, and the symbolic link is placed at `/usr/local/bin/pwsh`.

## Additional Resources

Expand Down