绕过powershell运行错误

绕过powershell运行错误

早上好

我正在尝试运行 powershell 脚本https://github.com/the-xentropy/xencrypt/blob/master/xencrypt.ps1并且脚本和我要加密的文件都位于同一目录中,我遵循的步骤是

Import-Module ./xencrypt.ps1
Invoke-Xencrypt -InFile test.ps1 -OutFile testcrypted.ps1

但我收到了错误

Invoke-Xencrypt : Exception calling "ReadAllBytes" with "1" argument(s): "Não foi possível localizar o ficheiro
'C:\Users\DESKTOP\test.ps1'."
At line:1 char:1
+ Invoke-Xencrypt -InFile test.ps1 -OutFile testcrypted.ps1
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Invoke-Xencrypt], MethodInvocationException
    + FullyQualifiedErrorId : FileNotFoundException,Invoke-Xencrypt

这可能是什么原因?

谢谢

相关内容