? PowerShell Learning Note--ps on MacOS ?
I Remember that there was a command line tool on Mac OS X using for connecting to Microsoft Azure. But now, Microsoft was developing MacOS version Powershell–powershell for MacOS v6.0 Alpha. Let's see it.
1. Download the PKG setup file
You can visit Github website and find the PowerShell repo Here:https://github.com/powershell/powershell, then scroll down To the Get PowerShell section. There is a table, find ' MacOS 10.11 ' line and click ' Pkg ' link, then download'll begin.
After finishing your download, find the file in your download folder and double click it to begin installation.
If you prefer command line tool to setup PowerShell, it's OK, here it's:
sudo installer -pkg powershell-6.0.0-alpha.16.pkg -target /
open A terminal window, copy and paste above command, then press Enter key to run. microsoft provides a installation instruction Here: https://github.com/powershell/powershell/blob/master /docs/installation/linux.md#macos-1011, read it carefully.
2. OpenSSL
To follow the instruction, your also need to setup OpenSSL because most networking functions does require OpenSSL to work pro Perly. On the instruction page, scroll down to ' OpenSSL ' section, click ' Their instructions ' link, follow the instructions to fin Ish installing Homebrew.
Now, must go to the MacOS Installation Instruction page and run the Commands list on the page.
Brew Install Opensslbrew Install Curl--with-openssl
then for security, need to patch. NET Core ' s Cryptography libraries:
find ~/.nuget -name system.security.cryptography.native.dylib | xargs sudo install_name_tool -add_rpath /usr/local/opt/openssl/libfind ~/.nuget -name system.net.http.native.dylib | xargs sudo install_name_tool -change /usr/lib/ Libcurl.4.dylib /usr/local/opt/curl/lib/libcurl.4.dylib
3. Try PowerShell Commands in MacOS Terminal
Now your can open a terminal to try this alpha version of PowerShell by typing "PowerShell" in the terminal window and pres Sing enter key, you'll enter PS enviroment.
Let ' s try some cmdlets.
PowerShell Learning Note--ps on MacOS