Home > Blogs > VMware PowerCLI Blog


vCloud Air On-Demand PowerCLI Evaluation Module

It is our pleasure to announce the evaluation of PowerCLI for vCloud Air On-Demand, this is an updated module which replaces your current PowerCLI 6.0 vCloud Air module and enables you to make a connection to the On-Demand portion of vCloud Air and use all other automation cmdlets to work with vCloud Air.

Whether it be reporting, provisioning or configuration, PowerCLI is a great tool to work with both your on-premises VMware environment and also your vCloud Air resources.

Download and Install Instructions

Download module from this post here: https://communities.vmware.com/docs/DOC-30128

1. If not already installed, download and install PowerCLI 6.0 R1 and make sure you select the vCloud/vCA module (tick box) during the install

2. If you already have this installed make sure you have all PowerCLI windows closed

3. Download the zip file from the fling site

4. Right click the zip file and go to properties, if there is an unblock button click it to unblock the zip file so the module can run without errors.

5. Extract it into a temporary folder and you should have the following:

folders.jpg

6. Open windows explorer to the following location: C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI\Modules

7. Backup the two folders with the same names as above to a different folder

8. Copy the new folders into this location and overwrite the existing files

9. Start PowerCLI and run: get-command -Module VMware.VimAutomation.PCloud

10. You should have the following new cmdlet “Get-PIComputeInstance”, if you do it worked!

NewCmdlets.jpg

How to connect

The Connect-PIServer cmdlet has been updated to support the new vCloud Air Platform with a -vCA parameter. This platform supports all On–Demand instances as well as VPC Subscriptions in selected regions. Previously, with the original cmdlet, only the original platform was supported. The original platform supports all Dedicated Cloud Instances as well as VPC Subscriptions in selected regions. Once connected, select a compute instance to connect to using the Get-PIComputeInstance cmdlet.  Once you have done this you are able to connect to the compute instance with the Connect-CIServer cmdlet and use all vCloud Air cmdlets to manage your vCloud AIr environment, for example, Get-PIVM will give you a list of VMs.

The following code shows two different methods of connecting to On-Demand and selecting a compute Instance and using it, after this the normal CI/PI cmdlets should work against your account.

Example 1: Connect to vCloud Air and get prompted for username and password and then a compute instance to connect to.

Connect-PIServer -vCA

#Choose Compute Instance with GUI

$CI = Get-PIComputeInstance | Out-GridView -OutputMode Multiple

$CI | Connect-CIServer

Example 2: Connect to vCloud Air with your vCA credentials and choose the california compute instance to connect to through code.

Connect-PIServer -vCA -User me@mydomain.com -Password “passw0rd1!”

# Choose Compute Instance in code

$CI = Get-PIComputeInstance -Region *cali* | Where { $_.ServiceGroup -match “M787177008” }

$CI | Connect-CIServer

This entry was posted in vCloud and tagged , on by .
Alan Renouf

About Alan Renouf

Alan Renouf is a Product Line Manager at VMware focusing on API's, SDK's and CLI's, He is responsible for providing the architects and operators of private and public cloud infrastructure with the toolkits/frameworks and command-line interfaces they require to build a fully automated software-defined datacenter. Alan is a frequent blogger at http://blogs.vmware.com/PowerCLI a book author and has a personal blog at http://virtu-al.net. You can follow Alan on twitter as @alanrenouf.

3 thoughts on “vCloud Air On-Demand PowerCLI Evaluation Module

  1. Toby

    Thanks for this Alan, great post.

    During Step 4. the “unblocking the zip” I didn’t get this option. I had to use “unblock-file *” in each of the modules directories to get it to load the DLLs.

    Thanks for sharing this with the community

    Toby

    Reply
  2. Pingback: Fog.io and vCloud Air « IT 2.0

  3. Alex

    Hi
    Alex here found your blogg and a good read for me.
    If you can share with me how to move beyond logging in example.
    I am trying to create some VDCs inside my vcloud air ondemand organization.

    If you can point me to any examples or doc I would really apprecaite it.

    Thanks

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

*