Below you will find some of the VIToolkit for Windows scripts that I have created in the past.
I’ll update this page with new scripts when I create new ones.

Adds additional information to Virtual Center:

Download the lastest version here.
This is a rewrite of the vcinfo.pl (VIPerlToolkit) that i created a while bach – This version is still in beta.
(Adds information about VMDK path, VMDK size, Network Adaptores, MacAddress, Network Type to Virtual Center)

– Added option to choose a VC folder to apply the VM information to.

More info will be added……

Script to Shutdown and PowerOff VM’s:

Download the latest version here.
The script creates a list of VM’s that isn’t PoweredOff, has VMwareTools not running, VMwareTools not installed and witch name doesn’t contain ex. “server”.Based on the list it tries to shutdown each VM.Then it waits/sleeps for 120 seconds, before it creates a new list of VM’s not powered off and witch name doesn’t contain ex. “server”.Based on the new list it poweroff (HARD) each VM.

It’s possible to use wildcards (*) in the name exclution.


Create a list of snapshots and mail it

Download the latest version here.
This script creates a list of VM’s that have snapshots attached.
The list is then piped to a html file using the cmdlet ConvertTo-HTML.
And to make it easier to obtain the html file, the file is mailed to who ever as an attachment.
The script is updated to handle multiable snapshots on a VM.

Update the configuration of a VM

Update a VM’s memory
Download the latest version here.
This scripts updates all VM’s that have less than 512MB of memory to 512MB.
Read more about th different options you can choose -> Here.

Update a VM’s ram & others
Download the latest version here.
This script does the same as the script “upgrade_vm_memory.ps1”, but also sets the following config settings

  • Sets Memory Reservation to half of the amount of ram.
  • Sets Memory Limit to “Unlimited”
  • Sets the VM to check for new VMware Tools on PowerOn.
  • Sets the VM to sync time from host.

Graph history on your ESX enviroments development

esx_history.ps1
esx_graph.zip
esx_history.sql

Webpages that shows the development of your ESX enviroment over time as graphs.

The following information is shown on the graphs:

  • Amount of VM’s in each Cluster
  • Amount of Hosts in each Cluster
  • The size of each Datastore and the amount of free disk space

Prerequirments:

  • MSSQL
    Create a new database on the MSSQL server and create the tables (See the esx_history.sql file for info)
    Create a MSSQL user and give the correct permissions to the new DB (Read / Write)
  • PHP
    Create a Windows-/Linux server that can show PHP pages and connect to MSSQL
    (I recommend a Windows because it’s easier to get it to connect to MSSQL)
    – Download and extract the PHP files to the www root and change the file “_variable.php” with your information.
  • PowerShell
    On a Windows server install the VMware Toolkit for Windows (PowerShell)
    – Download and copy the powershell script the the server and create a schedule so it runs 1-3 times a week.

List VMs with CD-Rom, Floppy, Serial Ports or Parallel Ports

Download the latest version here.

This script creates lists of VMs, for each of the below statements:

  • CD-ROM is ‘Connected’
  • CD-ROM set to ‘Connect at power on’
  • CD-ROM device type set to ‘Client Device’
  • CD-ROM device type set to ‘Datastore ISO file’
  • Floppy is ‘Connected’
  • Floppy set to ‘Connect at power on’
  • Floppy device type set to ‘Client Device’
  • Floppy device type set to ‘Use excisting floppy image in datastore’
  • Serial Ports attached
  • Parallel Ports attached

Add a host to a Cluster

Download the latest version here.

This script adds a host to a vSphere Cluster and licenses is.