PowerShell Learning Note--ps on MacOS

Source: Internet
Author: User

? 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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.