将其安装在Powershell中后无法直接整齐地运行

时间:2019-07-08 09:55:48

标签: powershell

这是我的powershell脚本文件

# Set up chololately
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))

# Install awscli locally
& "choco install -y awscli"

但是在安装后我尝试运行choco时失败了。

enter image description here

安装PS后如何在PS中运行某些内容?

1 个答案:

答案 0 :(得分:2)

尝试更改

& "choco install -y awscli"

为了公正

choco install -y awscli