[英]Could not load file or assembly - Powershell
我正在嘗試使用 Powershell 中的 Posh-SSH 模塊通過 SFTP 發送文件。
但是,我只是使用以下命令在 powershell 中以管理員權限安裝模塊:
Install-Module Posh-SSH -Force
iex (New-Object Net.WebClient).DownloadString("https://gist.github.com/darkoperator/6152630/raw/c67de4f7cd780ba367cccbc2593f38d18ce6df89/instposhsshdev")
但是,當我在沒有管理員權限的情況下運行 Powershell ISE 並調用我的腳本時,會出現下一個異常:
The 'New-SFTPSession' command was found in the module 'Posh-SSH', but the
module could not be loaded. For more information, run 'Import-Module Posh-SSH'.
正如 Powershell 所建議的,我添加了命令“Import-Module Posh-SSH”,但出現了另一個異常:
Could not load file or assembly 'netstandard, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies.
The system cannot find the file specified.
那么,知道如何解決這個問題嗎?
以管理員身份執行一次,然后工作!
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.