Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Passing Sessions into workflows #89

Open
Robonglious opened this issue Feb 22, 2019 · 1 comment
Open

Passing Sessions into workflows #89

Robonglious opened this issue Feb 22, 2019 · 1 comment
Labels

Comments

@Robonglious
Copy link

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 . }}

@DarkLite1
Copy link

Windows PowerShell Workflows are not desirable to be used anymore,, Workflows are no longer available in the newer PowerShell versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants