Differences
This shows you the differences between the selected revisions of the page.
2015-01-25 | 2015-01-25 | ||
I updated the module to use parameter names that match the assembly properties, so LocalItem is now LocalPath etc (107.5.184.56) | I updated the module to use parameter names that match the assembly properties, so LocalItem is now LocalPath etc (107.5.184.56) | ||
Line 107: | Line 107: | ||
# Piping the WinSCPSession into the Receive-WinSCPItem auto disposes the object after completion. | # Piping the WinSCPSession into the Receive-WinSCPItem auto disposes the object after completion. | ||
Open-WinSCPSession -SessionOptions (New-WinSCPSessionOptions -Hostname "example.com" -Username "user" -Password "mypassword" -SshHostKeyFingerprint "ssh-rsa 2048 xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx") | | Open-WinSCPSession -SessionOptions (New-WinSCPSessionOptions -Hostname "example.com" -Username "user" -Password "mypassword" -SshHostKeyFingerprint "ssh-rsa 2048 xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx") | | ||
- | Receive-WinSCPItem -RemoteItem "/home/user/file.txt" -LocalItem "C:\download\" | + | Receive-WinSCPItem -RemotePath "/home/user/file.txt" -LocalPath "C:\download\" |
</code> | </code> | ||