Top 10 PowerShell Scripts that VMware Administrators Should Use

Eric Siebert (Profile)
Thursday, February 6th 2014

(Original Posting Date: 12/10/2008)

PowerShell is an extensible command-line shell and associated scripting language developed by Microsoft that can be used to help automate common administration tasks and also provide information about your VMware environment. PowerShell can be used for many different things in Windows environments but can also be used with VMware environments since VMware released their VI Toolkit which provides PowerShell with access to the VMware API. Scripting is a great way to make up for a product's shortcomings or missing features and can be a real time saver for administrators. Consequently many systems administrators learn a bit of scripting and write their own scripts to make their job easier. PowerShell is fairly easy to install and use and there are many great scripts that have been written that work with VMware environments. This list consists of some great scripts that have been written by many different individuals that help automate and report on VMware environments.

1.  Quick Migration

A script from Mike DePetrillo that duplicates the Quick Migration of HyperV in a VMware environment by suspending a running VM and moving it to another ESX host server.

2.  Report into MS Word

A script from Alan Renouf that provides a report in Microsoft Word of the virtual machines in your environment with graphs and pie charts.

3.  Dynamic Resource Pool Calculator

A script from Eric Sloof that recalculates all of your resource pools and can automatically increase memory and CPU reservations. It can be run interactively using a GUI or through a command line with arguments.

4.  VMware Infrastructure Power Documenter

A script from Antonio Zamora that produces many different detailed reports about your VMware environment in Open XML

5.  ESX Automated Configuration Midwife

A script from Lance Berc that adds a new ESX host to VirtualCenter and configures networking, storage, VMotion and a few other things.

6.  VMware Health Check script

A script that produces a report of your VMware environment including information on snapshots, datastores, VMware tools versions, mapped CD-ROM drives and more.

7.  Track Datastore Free Space

A script from Hugo Peeters that produce reports that track free space on your datastores so you can see how it changes over time.

8.  List disk RDMS

A script that lists any Raw Device Mappings (RDMs) that exist in your environment which is helpful as RDM’s are not listed in the datastore list of ESX servers.

9.  Find Snapshots and Send Email to User/Users with

A script from Chris Uys that emails a report of snapshots that are running in your VMware environment.

10.  Setting Video Hardware Acceleration Level

A script from Hugo Peeters that sets the video hardware acceleration level inside Windows VMs to Full so they perform properly in a VMware environment.