Article ID: 119177, created on Dec 16, 2013, last review on May 10, 2014

  • Applies to:
  • Operations Automation

Symptoms

POA Open API provides powerful methods that allow the partners automating the sophisticated scenarios beyond the built-in capabilities of Parallels Automation Control Panel.
See the Public API Reference for more detail.
However, calling these methods is cumbersome, especially on Windows

Cause

The POA OpenAPI is based on the XML-RPC standard. Windows platform does lack any out-of-the-box tools for calling the XML-RPC methods, making POA OpenAPI scripting inconvenient.

Resolution

A simple script module based on Windows PowerShell (PS versions 2.0 and newer are supported) is attached to this article.

Installation and Upgrade from the Previous Versions

Download the attached POAShell.zip, and extract all contents to the folder %USERPROFILE%\Documents\WindowsPowerShell\Modules
Once this is done, attempts to execute any of the POA Shell cmdlets would automatically import the necessary modules.

Usage

  1. Connect to POA instance using Connect-PoaInstance cmdlet.
    Example:
    Connect-PoaInstance -poaMN 10.63.217.1 -credentials (Get-Credential)
  2. Execute any POA OpenAPI method using Invoke-PoaMethod cmdlet.
    Example:
    Invoke-PoaMethod -methodName 'pem.statistics.getStatisticsReport' -arguments @{reports=@(@{name='poaVersion'; value='0'})}
  3. There are also a few wrapper methods for some known POA OpeAPI methods. Use the following command to list the available functions:
    Get-Module POAShell
    Example 1:
    Get-PoaExchangeMailboxStores
    Example 2:
    Get-PoaExchangeMailboxID -email_address 'test@test.com'

Notes

This script is provided for experimental purposes. Feel free to mail your feedback to azlygostev {at} parallels.com

Attachments

5356b422f65bdad1c3e9edca5d74a1ae caea8340e2d186a540518d08602aa065 e12cea1d47a3125d335d68e6d4e15e07

Email subscription for changes to this article
Save as PDF