Recently I had to reset my old (2013) Macbook Pro and reinstalled the OS on it. After the last step – installing the latest update „blur“ – I thought its a good moment to setup PowerShell 7.1 and VS-Code. Learn below how I did it.
Install PowerShell 7.1
1.) Download Powershell from GitHub.
2.) Open Terminal and run the installation commands
sudo installer -pkg powershell-7.1.0-osx-x64.pkg -target /
Type „pwsh“ on the codlin and you sould get this:
Install OpenSSL
1.) Install the MacPorts as described here:
Exit Terminal once and restart the Terminal, otherwise the next command will fail.
sudo port selfupdate
2.) Get the latest version of ‚port‘
sudo port upgrade outdated
3.) Create the links
<code>sudo mkdir -p /usr/local/opt/openssl</code>
sudo ln -s /opt/local/lib/openssl-1.0 /usr/local/opt/openssl/lib
Install some great PowerShell tools for the comand line
Install-module posh-git # to see branches in git
Install-module oh-my-posh # great command line tool
Import-module oh-my-posh # run it
Activate predictive Intelligence in PSReadline:
Set-PSReadLineOption -PredictionSource History
Install VS Code
Download VS-Code from here. After the download you find the file in your download folder.
Move it to your Programs folder, so that you can run it from „Finder“
Click on Extensions and install the PowerShell extension
DONE ! Enjoy PowerShell on your Mac!
R.