Skip to content

PowerShell workflow default param string value shows error #669

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

Closed
dotps1 opened this issue Apr 10, 2017 · 8 comments
Closed

PowerShell workflow default param string value shows error #669

dotps1 opened this issue Apr 10, 2017 · 8 comments

Comments

@dotps1
Copy link

dotps1 commented Apr 10, 2017

System Details

  • Operating system name and version: Windows 10 1607 x64
  • VS Code version: 1.11.1
  • PowerShell extension version: 12.2
  • Output from $PSVersionTable: (the code commands don't have any output on my system?)
PS C:\> $pseditor.EditorServicesVersion

Major  Minor  Build  Revision
-----  -----  -----  --------
0      12     1      0

PS C:\> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      5.1.14393.953
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.14393.953
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Issue Description

in powershell workflow, a string default parameter is showing an error saying it needs to be a "simple value" like an int or a string. and it is a string.

Attached Logs

image

@daviwil
Copy link
Contributor

daviwil commented Apr 10, 2017

Do you get the same marker in the ISE? I think that would be coming from PowerShell.

@dotps1
Copy link
Author

dotps1 commented Apr 11, 2017

I do get the same thing in the ISE, but based on the error I just don't understand, it says must be simple values, int or string. that is a string.

@SydneyhSmith
Copy link
Collaborator

I am having trouble reproducing this, @dotps1 are you still running into this issue?

@dotps1
Copy link
Author

dotps1 commented Jan 8, 2019

its been like a year ¯_(ツ)_/¯

@dotps1
Copy link
Author

dotps1 commented Jan 8, 2019

but yes it is still happening:
image

@SeeminglyScience
Copy link
Collaborator

SeeminglyScience commented Jan 8, 2019

@dotps1 I know you're probably not looking for an answer anymore, but it's because the parameter is typed as a string array. Even though the default value specified in the script is a string, it would need to first be converted to an array for the typing to match. Workflows are compiled, so they tend to be a good deal more strict than normal PowerShell.

@dotps1
Copy link
Author

dotps1 commented Jan 29, 2019

good enough for me.

@dotps1 dotps1 closed this as completed Jan 29, 2019
@robe070
Copy link

robe070 commented Aug 1, 2020

@dotps1 Hi Thomas, do you debug Workflows in VS Code? Can you point me at any resources that can instruct me how to do it?
Thank you

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

No branches or pull requests

5 participants