Previous page

Next page

Locate page in Contents

RAS PowerShell API

RAS PowerShell API is intended for RAS administrators who would like to automate their RAS administration. The API includes commands to perform most of the RAS management tasks.

Parallels RAS Requirements

The Parallels RAS PowerShell API version must match the version of the RAS Publishing Agent with which it communicates. Since the two components can be installed separately, you need to make sure that their versions match.

Microsoft Windows Component Requirements

The following components must be installed on the computer where you'll be executing Parallels RAS PowerShell cmdlets:

  • Windows PowerShell 3.0 or higher
  • Microsoft .NET Framework 4.5.2 or higher

Installation

To install Parallels RAS PowerShell, run the standard Parallels RAS installer, choose Custom installation, and then select to install the Parallels RAS PowerShell component. Follow the onscreen instructions to install the component.

Basic Concepts

To quickly get started with RAS PowerShell, do the following:

  1. Open the Windows PowerShell console.
  2. In the console, type the following command to import the Parallels RAS PowerShell module:

    Import-Module PSAdmin

  3. Create a Parallels RAS session by executing the New-RASSession cmdlet (see example below). Substitute the server name (in quotes) with the name or IP address of your Parallels RAS Licensing Server. Type your RAS administrator username and password when prompted:

    New-RASSession -Server "server.company.dom"

  4. Execute the following cmdlet to see the list of cmdlets included in the Parallels RAS PowerShell module:

    Get-Command -Module PSAdmin

  5. Execute other cmdlets. For example, try executing the Get-GW cmdlet to retrieve information about RAS Secure Client Gateway(s). The example below returns information about all RAS Secure Client Gateways available in the RAS Licensing Server Site:

    Get-GW

  6. To see help for a cmdlet, execute Get-Help passing a cmdlet name:

    Get-Help Get-GW

  7. To apply changes you've made to the Farm configuration, use the Invoke-Apply cmdlet (this performs the same action as the Apply button in the RAS Console):

    Invoke-Apply

  8. To activate a Parallels RAS license, use the Invoke-LicenseActivate cmdlet:

    Invoke-LicenseActivate

    When executing the cmdlet above, you'll be prompted to enter your Parallels account email address and password. You can include an optional -Key parameter and specify a Parallels RAS license key. If omitted (as in the example above), Parallels RAS is activated as a trial.

Parallels RAS PowerShell Guide

The complete Parallels RAS PowerShell Guide (online HTML and downloadable ZIP versions) is available on the Parallels website at the following location: https://www.parallels.com/products/ras/resources