VMware Cloud Community
viktorious
VMware Employee
VMware Employee
Jump to solution

vRO Powershell plugin not returning results anymore?

Hi,

I'm running vRA 7.2 + vRO 7.2. I'm running the default "Invoke a PowerShell script" workflow, running a simple script Write-Ouput "Hello World". Normally I would receive the result of the script in the log pane being "Hello World" Smiley Happy. The log pane isn't displaying any message at all.

Another script provides some additional insights here:

var output;

var session;

try {

  session = host.openSession();

  var result = session.invokeScript(script); //Input script: Write-Output "Hello World".

  var scriptResult = result.getHostOutput();

  output = result.getResults();

  System.log ("script: " + script);

  System.log ("scriptResult: " + scriptResult);

  System.log ("scriptResult.length: " + scriptResult.length);

  }

catch(err) {

  System.log ("ERROR");

  error = err;

  }

finally {

  if (session){

  host.closeSession(session.getSessionId());

  }

  }

The log pane is displaying:

[2017-01-03 21:35:12.213] [I] script: Write-Output "Hello World"

[2017-01-03 21:35:12.217] [I] scriptResult:

[2017-01-03 21:35:12.219] [I] scriptResult.length: 2

As you can see, the script result length = 2 and there's no actual result. Am I missing something here? Some of my script that use the Powershell code are not working anymore. What's going wrong?

Thx

Viktor

0 Kudos
1 Solution

Accepted Solutions
iiliev
VMware Employee
VMware Employee
Jump to solution

Hi Viktor,

There is a serious regression introduced in version 1.0.10 of PowerShell plug-in (the version that ships with vRO 7.2).

We are looking into it. Until a fix is released, hopefully soon, one option would be to downgrade the plug-in to version 1.0.9 (the version that ships with vRO 7.1).

Sorry for the inconvenience Smiley Sad

View solution in original post

0 Kudos
7 Replies
iiliev
VMware Employee
VMware Employee
Jump to solution

Hi Viktor,

There is a serious regression introduced in version 1.0.10 of PowerShell plug-in (the version that ships with vRO 7.2).

We are looking into it. Until a fix is released, hopefully soon, one option would be to downgrade the plug-in to version 1.0.9 (the version that ships with vRO 7.1).

Sorry for the inconvenience Smiley Sad

0 Kudos
viktorious
VMware Employee
VMware Employee
Jump to solution

Ok thx, that doesn't sound good. The question is, where to download the vRO Powershell 1.0.9 plugin? Or is the only to export it from the vRO 7.1 appliance?

0 Kudos
iiliev
VMware Employee
VMware Employee
Jump to solution

If you have access to vRO 7.1 or vRA 7.1 appliance, the easiest way is to get plug-in's DAR file from there. Not sure if it available for a separate download; if needed, I can send it to you.

0 Kudos
viktorious
VMware Employee
VMware Employee
Jump to solution

I've exported the 1.0.9 Powershell plugin myself from a vRO 7.1 appliance. You also have to export/import the com.vmware.powershell package(s). After the downgrade the Powershell plugin (1.0.9) is working as expected and solved all of my issues.

I've made a blogpost about this, that's available here: https://www.viktorious.nl/2017/01/04/how-to-downgrade-the-buggy-1-0-10-powershell-plugin-thats-part-...

Thanks you for your feedback and input! I hope VMware will publish a patch soon.

0 Kudos
PetarGeorgiev
VMware Employee
VMware Employee
Jump to solution

Hello all,

The issue have to be fixed at the build provided at Technical preview version of VMware vCenter Powershell Plug-in 1.0.x

Sorry for  the inconvenience.

Best Regards,

Petar

0 Kudos
viktorious
VMware Employee
VMware Employee
Jump to solution

That's great! I was wondering, is the patch also included in the download for vRO/vRA 7.2?

0 Kudos
iiliev
VMware Employee
VMware Employee
Jump to solution

No, it is not included. But the technical preview versions of vRO plug-ins released here in the community forums are fully supported as 'official' releases.

0 Kudos