GeekAfterFive

Infrastructure as Code

home

PowerCLI in the Cloud

09 Jan 2012

a pictureIf you attended the PowerCLI sessions at VMWorld, you may remember the mention of a vCloud Snapin coming soon. This will be the first Powershell snapin allowing administration of your hybrid cloud environment. Exciting, huh? Well, prepare to get even more excited, because...

 PowerCLI 5.01 is now available, with a shiny new snapin for vCloud Director 1.5!

Check it out:
PS > Get-PowerCLIVersion
PowerCLI Version
----------------
 VMware vSphere PowerCLI 5.01
---------------
Snapin Versions
---------------
 VMware AutoDeploy PowerCLI Component 5.0
 VMware ImageBuilder PowerCLI Component 5.0
 VMware vCloud Director PowerCLI Component 1.5
 VMware License PowerCLI Component 5.0
 VMware vSphere PowerCLI Component 5.0
 
PS > Get-PSSnapin vmware.vimautomation.cloud

Name : vmware.vimautomation.cloud
PSVersion : 2.0
Description : This Windows Powershell snap-in contains This Windows Powershell for managing Cloud..
Let's take a look at the cloud cmdlets we get in this release!
get-command -Module vmware.vimautomation.cloud | select name

Name
----
Connect-CIServer
Disconnect-CIServer
Get-Catalog
Get-CIRole
Get-CIUser
Get-CIVApp
Get-CIVAppTemplate
Get-CIView
Get-CIVM
Get-ExternalNetwork
Get-Media
Get-Org
Get-OrgNetwork
Get-OrgVdc
Get-ProviderVdc
Import-CIVApp
Import-CIVAppTemplate
There are cmdlets for both the vCloud provider admin, AND the vCloud Org admin included in this release, so whether you run vCloud Director internally, or use a public Cloud provider like Bluelock, this snapin is for you! For your convenience, I've highlighted the cmdlets in the list above that are available to both Org and Provider admins. So, let's give them a try in a hybrid environment, where I am connected to my local vSphere and a public vCloud Provider. To connect as an Org admin, I'll need my username, password, and Org.
Connect-CIServer -org MyOrg -User Jake -Password cloud
I've connected to both my internal vSphere environment, and my public cloud provider. So doing a [code]Get-VM[/code] and then a Get-CIVM will list my VMs in both environments.
a picture
You'll also may notice from the list that there are no Set-* or New-* cmdlets. Never fear though, because in the next post we'll take a look at making some changes to our vCloud VMs with Get-CIView and the vCloud .NET SDK. Why are you still reading this? Go download it!
comments powered by Disqus