Differences
This shows you the differences between the selected revisions of the page.
| 2014-09-23 | 2014-09-23 | ||
| splitting the two examples (martin) | uppercase password (martin) | ||
| Line 85: | Line 85: | ||
| <code powershell> | <code powershell> | ||
| # Define the options for the WinSCP Session. | # Define the options for the WinSCP Session. | ||
| - | $options = 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" | + | $options = 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 the WinSCP Session with the defined options. | # Open the WinSCP Session with the defined options. | ||
| $session = Open-WinSCPSession -SessionOptions $options | $session = Open-WinSCPSession -SessionOptions $options | ||
| Line 98: | Line 98: | ||
| <code powershell> | <code powershell> | ||
| # 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 -RemoteItem "/home/user/file.txt" -LocalItem "C:\download\" | ||
| </code> | </code> | ||