<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Request to update PSCall documentation for getting data back from a ps1 asset]]></title><description><![CDATA[<p dir="auto">After many hours (over multiple days) I was finally able to get data back from a powershell script with with PSCall (which is really PSCall2 under the hood).  Unfortunately the documentation on your site doesn't have any information about what is needed in the powershell side of things.  I ended up using cursor to analyze the scripting extension dll and help me figure out what you code was expecting. I was surprised at how specific the answer was, especially since it appears to missing in the documentation and in my eyes is not anything anyone could guess on their own.</p>
<p dir="auto">I had to create an object in ps and turn it into JSON (which I had already done anyways) but having the variable was not enough.  I had to do a Write-Output with other specific parsing text.  Here is the resulting code:</p>
<pre><code>Write-Output "!INEDO_VAR!RepositoryInfo!$RepositoryInfoJson"
</code></pre>
<p dir="auto">I'm hoping that posting this here will help someone in the future and maybe even get the documentation updated.  Or maybe you'll tell me a better way to accomplish this same thing.</p>
<p dir="auto">Thank you,<br />
Brandon</p>
]]></description><link>https://forums.inedo.com/topic/5786/request-to-update-pscall-documentation-for-getting-data-back-from-a-ps1-asset</link><generator>RSS for Node</generator><lastBuildDate>Wed, 01 Jul 2026 16:34:51 GMT</lastBuildDate><atom:link href="https://forums.inedo.com/topic/5786.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 26 Jun 2026 23:03:39 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Request to update PSCall documentation for getting data back from a ps1 asset on Fri, 26 Jun 2026 23:03:39 GMT]]></title><description><![CDATA[<p dir="auto">After many hours (over multiple days) I was finally able to get data back from a powershell script with with PSCall (which is really PSCall2 under the hood).  Unfortunately the documentation on your site doesn't have any information about what is needed in the powershell side of things.  I ended up using cursor to analyze the scripting extension dll and help me figure out what you code was expecting. I was surprised at how specific the answer was, especially since it appears to missing in the documentation and in my eyes is not anything anyone could guess on their own.</p>
<p dir="auto">I had to create an object in ps and turn it into JSON (which I had already done anyways) but having the variable was not enough.  I had to do a Write-Output with other specific parsing text.  Here is the resulting code:</p>
<pre><code>Write-Output "!INEDO_VAR!RepositoryInfo!$RepositoryInfoJson"
</code></pre>
<p dir="auto">I'm hoping that posting this here will help someone in the future and maybe even get the documentation updated.  Or maybe you'll tell me a better way to accomplish this same thing.</p>
<p dir="auto">Thank you,<br />
Brandon</p>
]]></description><link>https://forums.inedo.com/post/19822</link><guid isPermaLink="true">https://forums.inedo.com/post/19822</guid><dc:creator><![CDATA[brandon_owensby_2976]]></dc:creator><pubDate>Fri, 26 Jun 2026 23:03:39 GMT</pubDate></item><item><title><![CDATA[Reply to Request to update PSCall documentation for getting data back from a ps1 asset on Mon, 29 Jun 2026 20:10:40 GMT]]></title><description><![CDATA[<p dir="auto">Hi <a class="plugin-mentions-user plugin-mentions-a" href="https://forums.inedo.com/uid/3830">@brandon_owensby_2976</a>,</p>
<p dir="auto">You're right that this is not very intuitive, and there are some outstanding issues we intend to fix in BuildMaster 2026. Generally, the best way to get all of this wired up right now is to have an <a href="https://docs.inedo.com/docs/buildmaster/otterscript-execution-engine/buildmaster-scripting-augmented-help" rel="nofollow">Augmented Help</a> header in the PowerShell script like this:</p>
<pre><code>&lt;#
.SYNOPSIS
    Appends world.

.AHPARAMETER inputvalue
    Input string

.AHPARAMETER resultingtext(output)
    Will be set to the resulting text

#&gt;

param ([string]$inputvalue, [ref]$resultingtext)

$resultingtext = $inputvalue + " world" 

</code></pre>
<p dir="auto">The key here is the <code>[ref]</code> specifier in the <code>param</code> block and the <code>(output)</code> specifier in the <code>.AHPARAMETER</code> augmented help header above.</p>
<p dir="auto">For scripts without a <code>param</code>/Augmented Help header, you should be able to use the <code>InputVariables</code> and <code>OutputVariables</code> parameters of PSCall2 instead.</p>
<p dir="auto">This is unfortunately missing from the docs at the moment, but before getting that updated I'd like to see if we can streamline or improve this to make it more intuitive.</p>
<p dir="auto">Does this help at all? We're happy to work with you to improve this before the 2026 release.</p>
<p dir="auto">Thanks!<br />
Greg</p>
]]></description><link>https://forums.inedo.com/post/19825</link><guid isPermaLink="true">https://forums.inedo.com/post/19825</guid><dc:creator><![CDATA[gdivis]]></dc:creator><pubDate>Mon, 29 Jun 2026 20:10:40 GMT</pubDate></item><item><title><![CDATA[Reply to Request to update PSCall documentation for getting data back from a ps1 asset on Mon, 29 Jun 2026 22:04:28 GMT]]></title><description><![CDATA[<p dir="auto">Hi <a class="plugin-mentions-user plugin-mentions-a" href="https://forums.inedo.com/uid/29">@gdivis</a></p>
<p dir="auto">I appreciate that extra info and that is a really nice bit to know.  I haven't had a chance to play this yet and if I can I may add another comment on this post with some updated information. The part that I'm not quite understanding from your post and the corresponding documentation is how it connects to the issue I had and fixed with the code in my original post.  My issue was never (that I knew of) with what showed up in the Buildmaster UI as I was using text view most of the time.  Granted I did switch to the visual editor at one point to see if it provided help on the output part, but it didn't.  It did however help me fix the input part (corrected the params declaration).</p>
<p dir="auto">What I'd like to know is if adding that help is going to somehow wire something up behind the scenes to prevent me from having to do that crazy Write-Output line in the ps1.  I can see how it would help me with the syntax of the Otterscript but that isn't where I was having my issue. For clarity my issue was that if I set the variable like you did the $resulttext in your example, it wasn't being set in otterscript.  I couldn't get it to work until the changed the ps1 to add one more line to do the Write-Output I posted above.  Hopefully that will help you understand my issue more and help with improvements for the 2026 version.</p>
<p dir="auto">Thank you,<br />
Brandon</p>
]]></description><link>https://forums.inedo.com/post/19827</link><guid isPermaLink="true">https://forums.inedo.com/post/19827</guid><dc:creator><![CDATA[brandon_owensby_2976]]></dc:creator><pubDate>Mon, 29 Jun 2026 22:04:28 GMT</pubDate></item><item><title><![CDATA[Reply to Request to update PSCall documentation for getting data back from a ps1 asset on Tue, 30 Jun 2026 01:17:01 GMT]]></title><description><![CDATA[<p dir="auto">Hi <a class="plugin-mentions-user plugin-mentions-a" href="https://forums.inedo.com/uid/3830">@brandon_owensby_2976</a>,</p>
<p dir="auto">Yes, that actually does wire things up with OtterScript, though I just realized I forgot to include a sample for how to actually invoke that script from OtterScript...</p>
<pre><code>PSCall2 MyScript.ps1
(
    Parameters: %(inputvalue: Hello, resultingtext: outputvar)
);

Log-Information MyScript returned $outputvar;
</code></pre>
<p dir="auto">The <code>Parameters</code> argument is meant to handle anything declared as an input/output value in the script's header. Note that for outputs you actually supply the name of the OtterScript variable to assign as the parameter value. For the record, I agree that this is all very confusing and we could certainly do a better job in the UI and docs. I believe the original goal when we added PSCall2 was to make the script parameters more discoverable, but at least as it works now, it has had the opposite effect.</p>
<p dir="auto">That crazy stuff with the prefix is the mechanism it uses behind the scenes to capture output values that are declared in that parameters header or in the OuputVariables argument.</p>
<p dir="auto">Does using this kind of header and PSCall2 invocation work at all for you? There's other things that could go wrong with marshalling values to/from PowerShell, but this ought to at least get you outputs without having to jump through those extra hoops.</p>
<p dir="auto">-Greg</p>
]]></description><link>https://forums.inedo.com/post/19829</link><guid isPermaLink="true">https://forums.inedo.com/post/19829</guid><dc:creator><![CDATA[gdivis]]></dc:creator><pubDate>Tue, 30 Jun 2026 01:17:01 GMT</pubDate></item><item><title><![CDATA[Reply to Request to update PSCall documentation for getting data back from a ps1 asset on Tue, 30 Jun 2026 15:59:43 GMT]]></title><description><![CDATA[<p dir="auto">Hi <a class="plugin-mentions-user plugin-mentions-a" href="https://forums.inedo.com/uid/29">@gdivis</a>,</p>
<p dir="auto">This actually clears up a lot for me.  I haven't made the adjustment yet but will do so very soon. Thank you so much for bringing it all together.</p>
<p dir="auto">Thank you,<br />
Brandon</p>
]]></description><link>https://forums.inedo.com/post/19833</link><guid isPermaLink="true">https://forums.inedo.com/post/19833</guid><dc:creator><![CDATA[brandon_owensby_2976]]></dc:creator><pubDate>Tue, 30 Jun 2026 15:59:43 GMT</pubDate></item></channel></rss>