vCloud 5.1 API Support in PowerCLI 5.1 R2

June 11, 2013

Table of Contents

It has been clear that some people were curious to know when the vCloud 5.1 feature will support powerCLI , wait no more! The powerCLI 5.1 R2 has officially stopped  and the new vCloud 5.1 feature are built in.

these new properties and featuresd are found in the .extensiondata of objects like a VM returned by Get-CVIM. Snapshots are a frequent request and I will show you how to find them:

$vm=Get-CIVM “MyVM”

$vm.ExtensionData | Get-Member

The good thing is that the .extensiondata is just the same as you would usually get from theGet-CIVeiw cmdlet.if you want to know how the new 5.1 VM snapshot properties and methods are available to us this is how to find out:

$vm=Get-CIVM “MyVM”

$vm.ExtensionData | Get-Member snapshot

You will now see that you have the ability to automate the creation, removal and revert of snapshots in vcloud Director 5.1

# Create Snapshot (Snapshot memory false, quiece true, snapshot name, description)

$vm.extensiondata.CreateSnapshot($false,$true,”Snapshot”,”Description”)

# Get VM snapshot

$vm.ExtensionData.GetSnapshotSection().snapshot

# Remove Snapshots

$vm.ExtensionData.RemoveAllSnapshots()

Edge gateways are a new feature in in vCloud Director 5.1, this is how to find them withoutany newcmdlets by using the Search-Cloud

Search-Cloud -QueryType EdgeGateway | Get-CIView

The search cloud returns a search object from which we can get the .NET object with all the properties and methods

$edge | Get-Member

You would have noticed that we did not use the .extensiondata, we just used the Get-CIView to get the .NET object configuration. This how you have a look at the .configuration:

$edge.configuration

If your vCloud provider is running on 5.1 you will be in a good position to enjoty the new features like both the vCloud Admin and Tenant PowerCLI snaps – ins which have been updated.

If more interested you can read about all the updates on the officia

Share on
Facebook
Twitter
LinkedIn
Pinterest
More posts

Dedicated Servers Quick Guide

What is a Dedicated Servers? Why bother using a dedicated server over a VPS or Shared Hosting?A dedicated server is a server 100% dedicated to your website/project or business needs.

dvPortgroup Inheritance

Someone may claim the default settings for portgroup inheritance in the dvSwitches, they may be missing in the vSphere client but they still exist and can be set in the

cPanel 2-Factor Auth Bypass

2-Factor Authentication Bypass hole in WHM cPanel security has been Reported effected WHM resellers. cPanel, a software provider to manage web hosting/websites, has recently patched a security vulnerability that allowed

RVTools 3.3 Now Available

Good news: RVTools 3.3 from Rob de Veij is now generally available to the public.  Release notes for this build: GetWebResponse time-out value changed from 5 minutes to 10 minutes

Live Help

Get 90% Discount

First 3 People gets the Bonus!
Don't Miss Out Our Big Sale

Get 0-90% On All
247Rack Services

247Rack

The Sale Is Until The End Of March