Skip to content

Passing Sessions into workflows #89

Description

@Robonglious

Please fill in the following fields, replacing the values inside the brackets {{ }}.

Issue Description

{{ Sessions can't be passed into workflows, they become serialized whatever that means. }}

Example

{{ $sess = New-WinSCPSession -SessionOption $sessoption
Move-em-Nice $folders.name $sess
workflow Move-em-Nice
{
param([string[]]$remotedirs, [WinSCP.Session]$sess)
WORK
}}

Expected Output

{{ No output but I want to have some files moved. }}

Actual Output

{{ Cannot process argument transformation on parameter 'WinSCPSession'. Cannot convert value "WinSCP.Session" to type "WinSCP.Session". Error: "Cannot convert the "WinSCP.Session" value of type "Deserialized.WinSCP.Session" to type
"WinSCP.Session"."
+ CategoryInfo : InvalidData: (:) [Get-WinSCPSession], ParameterBindin...mationException
+ FullyQualifiedErrorId : ParameterArgumentTransformationError,Get-WinSCPSession
+ PSComputerName : [localhost]. }}

WinSCP-PowerShell Version

{{ 5.13.7.0 WinSCP }}\

Environment

{{ Windows 2016
$PSVersionTable.PSVersion

Major Minor Build Revision


5 1 14393 2636 . }}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions