PowerCLI at VMworld US

Last year’s sessions by Alan and myself definitely was one of the highlights of my year. And judging by the comments and scores we received, it didn’t go down that badly with the attendees either. So this year we want to “raise the bar”. We have some fantastic sessions planned and hope you will come and see some of the things we have organised.

If I had to use one word to describe our sessions this year it would be “Super”. After you have seen the sessions you will understand why.

So to give you an idea of what we have planned we decided to give you a quick outline of our sessions and also a mention some of the other PowerShell and PowerCLI based sessions at VMworld….

And don’t forget to register in time !

Continue reading PowerCLI at VMworld US

VIProperties in a Module

Judging from the number of hits, the VIProperties page seems to be rather popular.
The number of entries on that page increases nearly on a daily basis.And judging by the list of people who submitted New-VIProperty entries, this particular feature of PowerCLI is in use all over the place.
Recently my co-author of the PowerCLI book, Jonathan Medd, had a brilliant idea.

Why not bundle all the VIProperties in a module ? The user would just have to do an Import-Module, instead of a copy/paste on each of the entries.

So for the 100th post on my blog I decided to bring you the VIProperty module.

Update August 25th 2011: added the use of the PowerCLI 5 Get-VIProperty cmdlet.

Continue reading VIProperties in a Module

VMX Raiders Revisited

This afternoon news of a new (and interesting) blog post from Julian Wood hit the Twitter-verse.

He took part from the logic of my Raiders of the Lost VMX script and used the relatively new VMFilePath parameter of the New-VM cmdlet, to shorten my script considerable. Well done, great job !

But I was intrigued by a remark in Julian’s post. He was obviously not too fond of using MoRefs in a script. But in Julian’s final script I still saw a Get-View cmdlet and the use of the HostDatastoreBrowser. Remembering a remark from one of my co-authors on the PowerCLI book, that the Get-View cmdlet would disappear, once the PowerCLI snapin would be sufficiently evolved, I decided to tackle Julian’s script and give it another simplification treatment and make it more PowerCLI 😀

Continue reading VMX Raiders Revisited

The making of a New-VIProperty called lunID

An interesting question arrived in my mailbox this morning. Robert wanted to know what was the most efficient way to create a new property, called lunID,  for the objects returned by the Get-ScsiLun cmdlet.

The new property had to show the lunID, as it is returned in the LUN column in the vSphere client.

Continue reading The making of a New-VIProperty called lunID

Discover Memory Overallocations

With the vSphere 5 licensing buzz from the past days and the incredibel number of hits on my Query vRAM post, I considered that a script to help you discover your memory overallocations might be useful.

The script uses the metric mem.usage.average to find out what amount of it’s allocated memory a guest is actually using. The script produces a report that will help you to determine which guests would be good candidates to lower their memory allocation.

Continue reading Discover Memory Overallocations

Query vRAM

After the Cloud Infrastructure Launch Forum event from July 12th 2011, it seemed that the new licensing model attracted more blog posts and tweets than the 140 new features in vSphere 5.

As one could imagine, one of the most heard questions was, what will I need to pay in the new licensing model. As a pro-active measure, I decided to write a short script that would tell me what vRAM entitlement my current vSphere 4 licenses would offer me.

Update August 4th 2011 08:30: VMware updated the vRAM calculation specifications. See the VMware vSphere™ 5.0 Licensing, Pricing and Packaging White Paper.

Update July 13th 2011 14:45: Apparently you have a vRAM pool per license type. I updated the script.

Continue reading Query vRAM

PowerCLI & vSphere statistics – Part 5 – Rollup Types

In my previous posts in this series, I showed how you can use metrics to produce statistical reports.

One aspect of the metrics that we haven’t touched till now is the roll up types for metrics. If we look in the PerfCounterInfo object under the rollupType property, we discover that there are several of roll up types available. The enumeration lists the following: average, latest, minimum, maximum, none and summation.

What do all these types mean, and more importantly how do we handle these in our scripts ?

That is the subject of this episode in the statistics series.

Continue reading PowerCLI & vSphere statistics – Part 5 – Rollup Types

Who acknowledged that alarm ?

Sometimes a solution to a problem is just staring you in the face.
While writing the PowerCLI book, I spent quite a bit of time on how to find which user acknowledged an alarm.
Today Eric “Scoop” Sloof launched the same question on Twitter. While I thought it was not possible, based on my past investigations, I decided to have a second look.

And of course now I found in a matter of minutes what had cost me fruitless hours before.

Continue reading Who acknowledged that alarm ?

Datastore usage statistics

An interesting question came up in the PowerCLI Community. Can one extract the datastore statistics, that are used for the space utilization graphs in the vSphere Client, with PowerCLI ? The graph in question, which you find in the Datastores Inventory view under the Performance tab, looks something like this.

Continue reading Datastore usage statistics