Differences
This shows you the differences between the selected revisions of the page.
| 2016-01-22 | 2016-02-04 | ||
| typo (martin) | hashtable style sessionoptions initilization (martin) | ||
| Line 84: | Line 84: | ||
| <code powershell> | <code powershell> | ||
| - | $sessionOptions = New-Object WinSCP.SessionOptions | + | $sessionOptions = New-Object WinSCP.SessionOptions -Property @{ |
| - | # sftp:// | + | ····# sftp:// |
| - | $sessionOptions.Protocol = [WinSCP.Protocol]::Sftp | + | ····Protocol = [WinSCP.Protocol]::Sftp |
| - | $sessionOptions.HostName = "example.com" | + | ····HostName = "example.com" |
| - | $sessionOptions.UserName = "martin" | + | ····UserName = "martin" |
| - | $sessionOptions.Password = "mypassword" | + | ····Password = "mypassword" |
| - | # -hostkey | + | ····# -hostkey |
| - | $sessionOptions.SshHostKeyFingerprint = "ssh-rsa 2048 xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx" | + | ····SshHostKeyFingerprint = "ssh-rsa 2048 xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx" |
| + | } | ||
| $session = New-Object WinSCP.Session | $session = New-Object WinSCP.Session | ||