Installing a VIB via PowerCLI

I’ve been rebuilding part of my home lab and trying to really not use Windows servers, so no update manager for me. Which means when it comes time to install a VIB, I can use lots of different mechanisms. I could turn on SSH and use ESXCLI, use the VMA or PowerCLI. Since I still have that installed on my Windows 7 VM, I figured that is the easiest for now. Unfortunately, there were no clear up examples out there of: I have a VIB on X Datastore -> Go install it! So I wrote out a little code and it works like a charm!

Essentially I connect to my home lab, get all of my hosts in ‘Cluster’ and then install my VIB from the VIBPath. It took all of 5 minutes vs. lots of manual typing. For those wondering, I was installing the Synology NFS VIB.

Connect-VIServer VC.home.lab
ForEach ($esxHost in (Get-Cluster “Cluster” | Get-VMHost))
$esxcli = Get-EsxCli -VMhost $esxHost


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s