Enable SSH Service on ESXi hosts using PowerShell

I found myself wanting to enable the SSH service on my ESXi hosts. I could use Host Profiles to enable it but I decided to PowerShell script it! To enable SSH there are three parts to it:

You will need to start the SSH service and set it to Start and Stop with Host:

And you will need to suppress the SSH is enabled warning message:

esxi-hosts-ssh-warning

This script does all of the above to an entire cluster. Let’s see it in action!

Read more…

How to Add ESXi Hosts to vCenter using PowerShell

There are quite a few clicks needed to add a host to vCenter. If you are deploying multiple hosts to your environment you have many clicks ahead. You should script it! This PowerShell script will make adding multiple hosts to vCenter easy!

Let’s see it in action!

Read more…

Add Virtual Machine Templates (.VMTX) to Inventory using PowerShell

Here is a script that will scan a datastore for VM templates (.VMTX) and add them to inventory. This is a modified version of the Add Virtual Machines (.VMX) to Inventory script.

You must have VMware PowerCLI installed in order to have the cmdlets required for PowerShell to run the script.

Add VMTX (Virtual Machine Templates) to Inventory from a Datastore:

Let’s see it in action!

Read more…

Add Virtual Machines (.VMX) to Inventory using PowerShell

There are quite a few clicks to add a virtual machine from a datastore to inventory. If you were to consolidate an environment and had to add multiple virtual machines this would be quite a manual task. Easier solution? Script it! The below script makes scanning a datastore and registering all virtual machines with vCenter a breeze.

You must have VMware PowerCLI installed in order to have the cmdlets required for PowerShell to run the script.

Add VMX (Virtual Machines) to Inventory from a Datastore:

Let’s see it in action!

Read more…