0

I am trying to import posh-ssh moudle to upload files to sftp server. I cannot install module in my windows server 2012 R2. Hence i used save-module in my local system and tried to import the module in the server. It imports few cmdlets but does not import the rest which i require to upload files to sftp.

Missing cmdlets Get-SFTPFile Set-SFTPFile New-SFTPSession

enter image description here

Martin Prikryl
  • 188,800
  • 56
  • 490
  • 992
Ash
  • 41
  • 7
  • 1
    How are you importing the module? It looks like you may have dot sourced a few of the cmdlets but not the module itself – Bryce McDonald May 17 '18 at 21:15
  • Oleg Oshkoderov reported a similar issue: https://stackoverflow.com/questions/50177867/powershell-sqlmodule-corrupted?noredirect=1#comment87434113_50177867. I don't think we ever figured out the issue. If you find a fix, let him know. – Adam May 17 '18 at 21:26
  • @BryceMcDonald Yes you were right. I imported the module using .psm1 file instead of .psd1 file – Ash May 18 '18 at 14:54

1 Answers1

0

I was trying to import the module by importing .psm1 file which did not include all the cmdlets . When i imported using .psd1 file , it include all the cmdlets from the module.

enter image description here

Ash
  • 41
  • 7