vCloud 5.1 API Support in PowerCLI 5.1 R2

Table of Contents

Facebook
Twitter
LinkedIn
Pinterest

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

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.

30 VMware vSphere Performance Tips

You most likely chose VMware’s vSphere as your virtualization solution due to it’s reputation as a solid and performant product; however, without proper attention and optimization you will not fully utilize the