[CentOS7]PowerShell安装

1. 下载地址

curl -O https://packages.microsoft.com/rhel/7/prod/powershell-7.1.3-1.rhel.7.x86_64.rpm

2. 安装依赖

yum install -y libicu

3. 安装powercli

rpm -ivh powershell-7.1.3-1.rhel.7.x86_64.rpm

4. 运行PowerCli

pwsh

[root@DB1 tmp]# pwsh
PowerShell 7.1.3
Copyright (c) Microsoft Corporation.

https://aka.ms/powershell
Type 'help' to get help.

PS /tmp> $<5>$<5>

5. 创建软链接

ln -s /usr/bin/pwsh /usr/local/bin/powershell

END

参考网站

https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell-core-on-linux?view=powershell-7.1

posted @ 2021-08-12 16:14  LeoShi2020  阅读(344)  评论(0编辑  收藏  举报