Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

PowerShell Learning Notes-- PS On MacOS

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

✪ PowerShell study notes-- PS On MacOS ✪

I remember that there is a command line tool on Mac OS X using for connecting to Microsoft Azure. But now, Microsoft is 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 "Get PowerShell" section. There is a table, find "macos 10.11" line and click "pkg" link, then download will 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 is:

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 an 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, you also need to setup OpenSSL because most networking functions do require OpenSSL to work properly. On the instruction page, scroll down to "OpenSSL" section, click "their instructions" link, follow the instructions to finish installing Homebrew.

Now you must go back to the macos installation instruction page and run the commands list on the page.

Brew install opensslbrew install curl-with-openssl

Then for security, you 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 you can open a terminal to try this alpha version of PowerShell by typing "powershell" in the terminal window and pressing Enter key, you will enter PS enviroment.

Let's try some cmdlets.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report