我正在使用 powershell 将 key 添加到 windows 7 x64
到目前为止,我已经使用 powershell 尝试了以下命令
powershell -executionpolicy bypass -file install-sshed.ps1
我遇到这样的错误:
The argument 'install-sshed.ps1' to the -File parameter does not exist. Provide the path to an existing '.ps1' file as an argument to the -File parameter
我做错了什么?
最佳答案
您的 PowerShell session 似乎是在与您的 PowerShell 脚本不同的文件夹中启动的。尝试将完整路径添加到您的 PowerShell 脚本:
powershell -executionpolicy bypass -file "c:\scripts\install-sshed.ps1"
或者,先切换到*.ps1
文件所在的目录:
cd c:\scripts
powershell -executionpolicy bypass -file install-sshed.ps1
关于powershell - -File 参数的参数 'install-sshed.ps1' 不存在 |电源外壳,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55324936/