1

I'm trying to use the Posh-SSH module in Powershell to send a file trough an SFTP.

However, I just install the module with administrator right in powershell using this command:

Install-Module Posh-SSH -Force
iex (New-Object Net.WebClient).DownloadString("https://gist.github.com/darkoperator/6152630/raw/c67de4f7cd780ba367cccbc2593f38d18ce6df89/instposhsshdev")

But, when i run the Powershell ISE without administrator rights and I call my script the next exception appears:

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'.

As suggested by Powershell, I've added the command "Import-Module Posh-SSH" but another exception appears:

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.

So, any idea how to solve this?

fuz
  • 88,405
  • 25
  • 200
  • 352
Giuseppe Lolli
  • 167
  • 4
  • 15

1 Answers1

0

Executed as Administrator one time and then worked!

Giuseppe Lolli
  • 167
  • 4
  • 15