[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 @   LeoShi2020  阅读(413)  评论(0编辑  收藏  举报
编辑推荐:
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
阅读排行:
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· 开源Multi-agent AI智能体框架aevatar.ai,欢迎大家贡献代码
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· AI技术革命,工作效率10个最佳AI工具
历史上的今天:
2020-08-12 [k8s]Error from server (NotFound): the server could not find the requested resource (get services http:heapster:)
点击右上角即可分享
微信分享提示