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