【发布时间】:2018-01-08 10:44:50
【问题描述】:
我想在powershell中运行这样的语句:
-ExecutionPolicy Bypass -File install-sshd.ps1
但我收到此错误消息:
-ExecutionPolicy:术语“-ExecutionPolicy”未被识别为 cmdlet、函数、脚本文件或可运行程序的名称。检查名称的拼写,如果包含路径,请验证路径是否正确,然后重试。
我应该怎么做才能解决这个问题? 非常感谢
【问题讨论】:
-
Set-ExecutionPolicyss64.com/ps/set-executionpolicy.html -
在通过playwright - getting started 时遇到了类似的问题。我使用
pwsh -ExecutionPolicy Bypass -File bin\Debug\net6.0\playwright.ps1 install解决了它。如果无法识别pwsh,您可以安装新版本dotnet tool install --global PowerShell
标签: powershell