Home > Blogs > VMware PowerCLI Blog > Monthly Archives: April 2012

Monthly Archives: April 2012

Preparing the hosts in Provider VDCs with PowerCLI

Posted by
Alan Renouf
Technical Marketing

Following my previous post where I showed how easy and quick it was to create a Provider VDC there was a step which we needed to complete before the Provider VDC would be available to use, if you took note of the last screenshot it looked the same as below:


The more attentive of you will have noticed the system alerts on the status, this is because we had not prepared the hosts within our cluster to be used with vCloud Director.  When first adding ESXi hosts to a VCD Provider VDC an agent is needed on the hosts, Chris Colotti explained recently what this agent was needed for here.

There are two ways to add this agent, the first is to include it in your ESXi Image, this is explained here and can also be used with Auto Deploy, if it is not pre-included in the ESXi build then it will need to be installed after the hosts have joined VCD.

To do this we can use the below script on each host in the Provider VDC:

Function Prepare-CIHost {
    Param (
    $Search = Search-cloud -QueryType Host -Name $CIHost
    $HostView = Get-CIView -SearchResult $Search
    $HostView.Prepare($password, $username)

Prepare-CIHost -CIHost "ESXiHost1" -Username "root" -Password "Pa$$w0rd"

There are a couple of interesting techniques in this simple script, use of the –SearchResult parameter in the Get-CIView cmdlet can be very handy, If you are looking into automating VCD with PowerCLI I suggest you look at this further.

Another cmdlet used in this script is the Search-Cloud, again a very useful cmdlet which allows you to find objects in the Cloud very fast.  More examples and details of the Search-Cloud cmdlet will be mentioned in a future post.

Get notification of new blog postings and more by following VMware PowerCLI on Twitter: @PowerCLI

PowerCLI Webcasts

Posted by
Alan Renouf
Technical Marketing

Recently there have been some great webcasts on PowerCLI, I wanted to make sure that these were available for everyone to watch.  Firstly I will start off with the BrownBag Webcasts, if you don’t attend these I highly recommend you check them out, the BrownBag Webcasts were started by Cody Bunch and are a weekly webcast which goes through various VMware products and technologies in around 1hr (sometimes they run over).

You can find a full list of the BrownBag Webcasts and detail on how to attend these here: http://professionalvmware.com/brownbags/

Two that I would like to point out are related to PowerCLI.

PowerCLI 101

This webcast goes through an introduction to PowerCLI and PowerShell itself showing great resources and learning tips.  This webcast was presented by Glenn Sizemore who’s blog can be found here.

PowerCLI 201

This webcast was presented by Jake Robinson and Josh Atwell and takes PowerCLI one step further, expanding on the knowledge of the PowerCLI 101 BrownBag to give you some great tips and resources.

Idera Webcasts

Next up is a great webcast bought to you from Idera and being presented by Luc Dekens from Lucd.Info, Idera have multiple webcasts focused around PowerShell which can be found here: http://www.idera.com/Education/PowerShell-Webcasts/

Luc’s first webcast is called “VMware PowerCLI – First Steps” and is well worth watching if your learning or thinking about learning PowerCLI.

Luc is also due to present a second webcast on April 25th, this will take your PowerCLI learning one step further to being an automation wizard, to sign up for this and have the chance to ask questions live make sure you follow this link.

Get notification of new blog postings and more by following VMware PowerCLI on Twitter: @PowerCLI