博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
PowerShell 学习笔记——PS On MacOS
阅读量:7042 次
发布时间:2019-06-28

本文共 1904 字,大约阅读时间需要 6 分钟。

 PowerShell 学习笔记——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:  then scroll down to “Get PowerShell” section.  There is a table, find “macos 10.11” line and click “pkg” link, then download will begin.

screen-shot-2017-02-21-at-13-38-24

screen-shot-2017-02-21-at-14-12-59

screen-shot-2017-02-21-at-13-54-58

After finishing your download, find the file in your Download folder and double click it to begin installation.

%e5%b1%8f%e5%b9%95%e5%bf%ab%e7%85%a7-2017-02-19-23-52-14

%e5%b1%8f%e5%b9%95%e5%bf%ab%e7%85%a7-2017-02-19-23-52-39

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 a installation instruction here:  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.

screen-shot-2017-02-21-at-14-31-45

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.

%e5%b1%8f%e5%b9%95%e5%bf%ab%e7%85%a7-2017-02-19-23-56-27

Let’s try some cmdlets.

screen-shot-2017-02-20-at-00-08-58%e5%b1%8f%e5%b9%95%e5%bf%ab%e7%85%a7-2017-02-20-00-04-02

转载地址:http://rfqal.baihongyu.com/

你可能感兴趣的文章
RNA药物研发初创公司Panorama Medicine完成370万美元种子轮融资 ...
查看>>
我国抢占“第二次量子革命”全球制高点
查看>>
Living the Stream: Live-streaming in China
查看>>
CommonJS/AMD/CMD/UMD概念初探
查看>>
字符串拷贝记得strcpy
查看>>
[微信小程序]通过计算其他view的高度,动态给定scroll-view的高度
查看>>
旋转图像
查看>>
中国电信天翼U盾产品荣获第三届网络安全国家标准优秀应用案例二等奖
查看>>
php结合数据库演示商品多图片上传
查看>>
网上找到的题目
查看>>
支持全球游戏加速 飞鱼星发烧级玩家路由G7上市
查看>>
Win32环境下代码注入与API钩子的实现
查看>>
读Linux那些事儿之我是U盘笔记(七)
查看>>
详细图解SharePoint 2007部署和配置过程
查看>>
centos7 基于pxe安装系统
查看>>
节假日批量设置的C#.NET程序代码参考 荐
查看>>
Vim键盘布局
查看>>
Exchange2010管理控制台无法安装
查看>>
android用户界面-组件Widget-网络视图WebView
查看>>
KVM 存储虚拟化 - 每天5分钟玩转 OpenStack(7)
查看>>