How to install PowerShell on the Mac

PowerShell Mac
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)""
brew install --cask powershell
echo '# Set PATH, MANPATH, etc., for Homebrew.' >> /Users/{username}/.zprofile

    echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/{username}/.zprofile

    eval "$(/opt/homebrew/bin/brew shellenv)"
pwsh

References: