- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-15-2014 01:31 AM
Chad,
Did you get solution for it? I am having issues in passing variables to powershell script, I am passing like $env:SNC_<variable_name> but script is failing but if i hard code value there its success.
Thanks,
Kartheek
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-15-2014 07:07 AM
Kartheek,
I have not managed a solution for using the PowerShell script variables field yet. Are you using the Script file field on the Run PowerShell activity to pass your script or are you using the command window? I have done alot of PowerShell activities so maybe I could help get yours going.
Regards,
Chad
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-15-2014 07:38 AM
Chad,
I found solution for this, it looks like below.
In your workflow you should pass name as :
"name": "${your variable here if dynamic}"
and in powershell
$localVar = $env:SNC_name; // this is your workflow var
Thanks,
Kartheek
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-15-2014 07:53 AM
Kartheek,
That did it! Thank you very much.
Regards,
Chad
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2015 08:10 AM
Hello everyone,
I would like to execute a Powershell script over the Run Powershell workflow acticity.
But I don't really know who does it work. Could somebody explain me who I can define PowerShell script variables for the command field?