Update January 7th 2017: A patch is available for the plugin, version 1.0.11 has been released and should resolve the issues discussed in this artile. The patch is available for download here. Note that this patch is not yet included in the vRO/vRA 7.2 download, so you have to run this upgrade after you’ve downloaded the 7.2 version of vRO/vRA.
The latest version (7.2) of vRealize Automation comes with vRealize Orchestrator 7.2. vRO 7.2 comes with a new vRO Powershell plugin (version 1.0.10) that seems to be a bit buggy.
I personally faces an issue that the Powershell plugin is not returning results of a Powershell command that’s executed in vRO. For example if you use the standard Invoke a Powershell script in vRO running the Powershell command:
Write-Host "Hello world"
You don’t get a Hello world back:
The result is….empty! (Actually it contains only two space characters).
(vRO should return….Hello world) -> This issue can have big implications on your existing Powershell scripts that are part of vRO workflow: because no result is returned, analyzing the result is impossible! You can read my issue also in this VMware communities post, this post includes some additional details.
Another post reports Powershell scripts being executed twice when using the 1.0.10 plugin, read this post at the VMware communities.
Currently there’s no solution for both issues. So let’s have a look at two possible workarounds:
- The first one is quite obvious: don’t upgrade to vRA/vRO 7.2
- If you’ve already upgraded to vRA/vRO 7.2, you can downgrade the Powershell plugin to 1.0.9. This is the version that was shipped with vRA/vRO 7.1 at doesn’t have these bugs. I don’t know if this is actually supported, because there’s no information on vRO / vRO plugin interoperability. The only thing I know is that vRO 7.2 is required if you run vRA 7.2.
How to downgrade the Powershell plugin to 1.0.9
As it looks now, the Powershell plugin 1.0.9 is not available a a separate download (bummer). So the only way to download the plugin is to export version 1.0.9 from vRO 7.1, and then upload this version to vRO 7.2.
The first step is to open the control center interface on vRO 7.1 and choose plugins. Look for the Powershell plugin and download it to your local machine.
You will get a file named o11nplugin-powershell.dar. Also download the com.vmware.library.powershell and com.vmware.library.powershell.converter packages from the 7.1 server to your local system:
Now remove the 1.0.10 plugin from the vRO 7.2 server following the procedure in VMware KB 2064575. I first removed registered Powershell hosts through the orchestrator client interface. Next, stop the vro services:
/etc/init.d/vco-configurator stop /etc/init.d/vco-server stop
Remove the Powershell plugin from the /usr/lib/vco/app-server/plugins directory, the filename is o11nplugin-powershell.dar. Also remove the Powershell entry from the /etc/vco/app-server/plugins/_VSOPluginInstallationVersion.xml.
Now start the vco configurator service:
Login to the configurator interface and verify the plugin is succesfully removed. Now restart the entire server. After the vRO server is restarted log in to the vRO client and remove the com.vmware.library.powershell and the com.vmware.library.powershell.converter package.
Now you can manually upload the 1.0.9 plugin you’ve downloaded earlier in the process:
Restart the vRO server again. Now logon the orchestrator client and upload the com.vmware.library.powershell and com.vmware.library.powershell.converter package, make sure you import (and overwrite) all existing Powershell workflows and actions:
You’re set. Now add a Powershell host and try a workflow using the 1.0.9 Powershell plugin.
And yes, the Invoke a PowerShell script Write-Host “Hello world” example, displays a….Hello World again!
You’re set now and ready to test some more advanced workflows. Depending on your configuration you might have to include the new Invoke a Powershell script and/or Invoke an externap script in to your vRO workflows.
A first test of some of my enhanced vRO workflows using the Powershell plugin in my lab environment provides with some good results. It looks like the downgrade solved my issues.
I hope this was helpful! As soon there’s a patch available, I will post here.
Bechtel National Inc
Thank you for this post. I ran into the same issue and reverting the plugin worked for me as well.
Happy to hear the article helped you!
Patched version of the plugin is available here
Hope it helps!
Wow that’s quick, great! I’ve updated the article accordingly.