Differences

This shows you the differences between the selected revisions of the page.

2015-07-10 2015-10-15
typo (martin) $sessionUrl not to conflict with $session (martin)
Line 34: Line 34:
    # Mandatory parameters     # Mandatory parameters
    [Parameter(Mandatory)]     [Parameter(Mandatory)]
-    $session,+    $sessionUrl,
    [Parameter(Mandatory)]     [Parameter(Mandatory)]
    $remotePath,     $remotePath,
Line 57: Line 57:
param ( param (
    [Parameter(Mandatory)]     [Parameter(Mandatory)]
-    $session+    $sessionUrl
) )
Line 63: Line 63:
$sessionOptions = New-Object WinSCP.SessionOptions $sessionOptions = New-Object WinSCP.SessionOptions
-$sessionOptions.ParseUrl($session)+$sessionOptions.ParseUrl($sessionUrl)
$session = New-Object WinSCP.Session $session = New-Object WinSCP.Session
Line 69: Line 69:
</code> </code>
-Use ''!S'' pattern in the custom command to feed the session %%URL%% to ''session'' parameter:+Use ''!S'' pattern in the custom command to feed the session %%URL%% to ''sessionUrl'' parameter:
<code batch> <code batch>
-powershell.exe -File c:\example\example.ps1 -session !S+powershell.exe -File c:\example\example.ps1 -sessionUrl !S
</code> </code>

Last modified: by martin