繞過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

我的原因是什麼?

謝謝

相關內容