Adding VMKernel ports to multiple hosts using PowerCLI

So, yesterday I was asked to quickly put together a script to add VMkernel ports to Multiple ESXi hosts. I have a script to add VM Port groups to multiple host, and this is easy. But the issue with the VMkernel ports is that they require a unique IP address.

So I put together the following CSV and Script

CSV File which includes the below information. Obviously the fields will be changed to suit your network

Continue reading Adding VMKernel ports to multiple hosts using PowerCLI

Clone Datastores from one ESXi host to Another

As we I progress with our server refresh and I continue to build our global virtualised infrastructure, I am constantly trying to make things easier for my less experienced colleagues and so that there will be consistency in what we do. One of the most tedious tasks must be NFS datastore creation. While we could script this out and create each datastore individually, I figured I would try find a way clone the datastore configuration from one host to another. This way you simply execute the script and let it run along, giving you time for other cool stuff.

This little script will save you hours, especially if you have hundreds of datastores and hosts.

Script 1: This is for host to host clone only

Script 2: This for host to Cluster wide .

Copy the above text in to a text document and save it as a ps1 (powershell) file and run it using PowerCLI.

Finding Groups that have disabled users in them

This is just a quick powershell script to find all users who are a member of a certain group (of certain groups).
We were running out of licenses for one of the products we use internally. This product is tied to group memberships. Instead of clicking on each indivual group or disabled user (approximate 40 groups or 560 disabled users), I figured I would draft up a quick powershell to do the work for me.

Continue reading Finding Groups that have disabled users in them