Use PowerCLI to find the datastore from a disk name

PowerCLI logoRecently we get vSphere alarms in our environment that say for instance:

“[VMware vCenter – Alarm Host error] Issue detected on host in datastore: ScsiDeviceIO: 2368: Failed write command to write-quiesced partition naa.600a0b8000111155000021c53f97784e:1 (42:01:04:07.994 cpu7:5191)”

There seems to be a problem on a partition. But which datastore is on this partition? We can use PowerCLI to find the datastore involved. Read more of this post

VMware vExpert 2012

This week VMware announced the vExperts for 2012 and I am proud to be one of them. Last year I didn’t make it. But this morning I received the following e-mail from Alex Maier who is the VMware vExpert Program Manager:

I am pleased to inform you that you have been designated a vExpert 2012 in recognition of your contribution to the VMware, virtualization, and cloud computing community.

You’ve done work above and beyond, helping others succeed with VMware, and we here in the Social Media and Communities team are delighted to welcome you to the program.

VMware vExperts are a special group, a network of peers, who communicate with each other and VMware closely, share resources, and get other opportunities for greater interaction throughout the year.

Thanks for all you do. The vExpert Program is going to be great this year. Keep on rocking!

With kind regards,
Alex Maier (vExpert Program Manager) and the VMware Social Media and Communities Team

Many thanks to Alex and John Mark Troyer, who started the vExpert program three years ago.

I am proud to be part of the VMware vExperts. And I look forward to work with VMware and the other vExperts more closely.

Congratulations to all the other vExperts 2012!

More information about the VMware vExpert program can be found at the vExpert Directory.

Top Blog 2012 results

Today Eric Siebert announced the Top Blog 2012 results. When I nominated my blog for the Top Blog voting I was a little bit afraid that I might end up last. But I didn’t.

My results

Here are my results:

Category Place Votes
Overall 145 19
Favorite Scripting Blog 10 21
Favorite New Blog 12 38
Favorite Independent Blogger Not listed

Table1. My results at the Top Blog 2012 voting.

There were 187 blogs nominated in total. So I’m very happy with place 145.

This result stimulates me to try to write a lot of good blog posts this year. And I hope to do it even better in the Top Blog voting next year.

Thank you to all who voted for my blog!

Function to speed-up the execution of the first PowerCLI cmdlet

PowerCLI logo
Last year there was a post on the PowerCLI Team blog called How to speed-up the execution of the first PowerCLI cmdlet. That post showed commands you need to execute to pre-compile some of the PowerCLI code to prevent this from being done in every PowerCLI session.

Running these commands will speed-up the execution of the first PowerCLI cmdlet you run in your session. The blog post was made before PowerCLI 5.0 was released and didn’t show the commands to speed-up PowerCLI 5.0. Later there was a post at the vNugglets blog Speed Up First PowerCLI 5 cmdlet — Precompile XMLSerializers that shows the commands needed for PowerCLI 5.0.

But what happens when PowerCLI 5.1 or 6.0 is released? Of course we can try to find the new commands needed to speed-up PowerCLI every time a new version is released. But would it not be easier if we have a function that will do this for you?

The Install-PowerCLIXmlSerializer function presented in this post will show you a PowerShell function that you need to run once after you install a new PowerCLI version to speed-up the execution of the first cmdlet every time you run PowerCLI. Read more of this post

PowerCLI 5.0.1 Connect-VIServer repaired

PowerCLI logo
PowerCLI up to version 5.0.1 showed the connected servers in the title bar of the window. I found this very handy. Unfortunately though VMware has removed this feature in version 5.0.1. In this blogpost I present you a script that returns this feature. Read more of this post

Speed up your PowerCLI cmdlet typing with aliases

PowerCLI logoIf you are like me and managing a VMware vSphere environment is your daily job, and you want to automate your job as much as possible, you probably always have a PowerCLI session open. PowerCLI cmdlet names are sometimes pretty long. Of course you can use tab completion. But wouldn’t it be nice if you had short aliases for the PowerCLI cmdlets? Read more of this post

How to find VMware ESX(i) servers that need a reboot using PowerCLI

If you install patches to your ESX(i) servers you will probably have to reboot them. But if you don’t reboot them right after installing the patches, how can you find the servers that are patched and waiting for a reboot? Read more of this post

Using PowerShell to install the WDDM video driver

PowerShell logoYesterday we discovered that the system hangs, we sometimes have on our Windows Server 2008 R2 systems are caused by the video device driver. Because we don’t want to install another video driver manually in all our Windows 2008 R2 systems, we needed a script to do this. Read more of this post

Check your vSphere cluster hosts patch level with PowerCLI

PowerCLI logoIt is a best practise to keep all the hosts of a VMware vSphere cluster at the same patch level. That means that all the hosts need to have the same patches installed. But how do you easily check if this is the case? This is where PowerCLI will help you. Read more of this post

How to use the vCenter Server Settings from PowerCLI to send e-mail

PowerCLI logoIf you use PowerCLI to generate reports and send those reports to you via e-mail, you probably have the sender e-mail adress and the smtp server hard coded in your script. But what if one of those changes? You will have to modify all your scripts. Wouldn’t it be easier if you have stored them in one place, so you have to change them only once? Read more of this post