5.5.2

Table Of Contents
Passing Invocation Results Between Actions
The PowerShell plug-in supports passing of results as parameters from one PowerShell script invocation to
another. To pass results correctly, both invocations must happen in the same session.
PowerCLI Integration with the PowerShell Plug-In
You can use functionality that is available in a third-party snap-in, such as VMware vSphere PowerCLI,
with the PowerShell plug-in.
To use the third-party snap-in functionality, the snap-in must be available on the PowerShell host. To load
the snap-in in the current session, you must also call the AddPsSnapin action. When using PowerCLI, you
must set the name of the snap-in to VMware.VimAutomation.Core.
The PowerShell plug-in does not provide pre-generated actions for third-party snap-ins. You can generate
actions for third-party snap-ins by running the Generate an action for a PowerShell cmdlet workflow. See
“Generate an Action for a PowerShell Cmdlet,” on page 122.
The com.vmware.library.powershell.converter package contains basic building blocks that allow
conversion from a vCO VC:<SomeObjectType> object, to the corresponding object from PowerCLI. This feature
allows workflows from the vCenter Server plug-in to interact with workflows from the PowerShell plug-in
and to pass parameters between the two plug-ins.
Converter Workflows
You can use the sample workflows from the Converter workflow category to test the integration between
the PowerShell plug-in and PowerCLI. To test the integration, PowerCLI must be installed on the
PowerShell host.
The Converter sample workflows demonstrate the conversion functionality available in the plug-in.
NOTE The PowerShell plug-in does not support all types that are available in PowerCLI and the vCenter
Server plug-in. Unsupported types return an exception.
You can access these workflows from Library > PowerShell > Samples > Converter on the Workflows view
in the Orchestrator client.
Workflow Name Description
Convert PSObject to vCO object
Converts PowerShellRemotePSObject to VC:<SomeObjectType>.
Convert PSObject to vCO object to PSObject
Converts PowerShellRemotePSObject to VC:<SomeObjectType> and the
reverse.
Convert vCO object to PSObject
Converts VC:<SomeObjectType> to PowerShellRemotePSObject.
Sample Workflows
The Samples workflow category contains workflows that allow you to test basic use cases.
You can access these workflows from Library > PowerShell > Samples on the Workflows view in the
Orchestrator client.
Workflow Name Description
Invoke a script via API Demonstrates how to call a PowerShell script through the available scripting API.
List directory content Lists the contents of a directory.
Pipeline execution example Demonstrates how you can run multiple cmdlets arranged into a pipe.
Chapter 20 Using the PowerShell Plug-In
VMware, Inc. 123