首页 > 解决方案 > powershell 2.X 是否支持下载和运行脚本?

问题描述

我创建了一个install.ps1来安装一个大程序。在类 UNIX 操作系统中,我们曾经这样做:

bash -c "$(curl -L https://url/to/my/install.sh)"

我的脚本是为 Windows 2008 Server sp2 设计的,默认的 powershell 是 2.x。powershell 2.x 可以这样运行吗?</p>

start-bitstransfer -source https://url/to/my/install.ps1 | powershell

我试过这样,但新的 powershell 会话失败了,这不是我们想要的。

标签: powershell-2.0

解决方案


推荐阅读