PowerCLI in the PowerShell Gallery – how to and why?

PowerCLI is the best managing and automation tool for vSphere environments. I cannot imagine my work without this fantastic thing. The only one inconvenience I see in the PowerCLI is an installation procedure. In every single Windows I have to download and install .msi package. But now it has changed! We can find PowerCLI in the PowerShell Gallery – now there are two versions, 6.5.1.5377412 and 6.5.1.5273662. How to install PowerCLI from the PowerShell Gallery? Installation process is very simple. You just need to type the following command in your PowerShell (don’t forget to run as Administrator):

If you cannot install because of “The Continue reading

Alias for Connect-VIServer arguments – PowerShell functions

I think most of you agree with me when I say that typing “Connect-VIServer -Server name-of-server” is very annoying. Especially when you have many vCenter Servers to manage. First thing that comes to everybody’s mind is “hey, we can use PowerShell aliases”! And yes, but only for shorten cmdlet. You can have some problems with passing parameters into the alias. But don’t worry, there is another – better in my opinion – way to do that. Functions. It’s a simple way for creating aliases for Connect-VIServer arguments. Without further ado, there you are a template of the mentioned functions: View the code Continue reading

Fun with PowerCLI – how to get Windows VMs in vCloud Director

Honestly speaking, I’m in love with PowerCLI. I know that VMware admin cannot optimize his job without PowerCLI, but in my case it’s a higher level of scripting love. At first, I want to stress that my scripting experience started with Linux systems and its scripting languages. I have been in awe of how excellent PowerShell can be since I decided to simplify my work with Windows Servers. Of course VMware administration has enforced me to become friends with PowerShell. New cmdlets, new possibilities, and – last but not least – the best way for managing and configuring VMware vSphere Continue reading