Ben's Blog
  1. Get the last user to power down a VM

    🏷️ vmware-vsphere, powershell

    We can use PowerShell to search through the event logs of a machine object ($virtualMachine in the example below) for events which match a specific pattern - in this case powering off a machine. Once we have the event object, we can access the properties of the first object in…

  2. Cleaning up VM template names

    🏷️ vmware-vsphere, powershell

    I wrote this today to remove occurrences of the string "Tmpl" anywhere in the name of the template, and then to re-name the template with "Tmpl" as a prefix. It had a higher purpose than keeping everything nice and neat, but it's rather specific to our environment so I won't…

  3. Virtual machine BSoD detector

    🏷️ vmware-vsphere, powershell

    Carter Shanklin has used Microsoft Office Document Imaging Library (MODI) to improve Eric Sloof's script to detect Blue Screens of Death (BSoDs); it now captures the errors and converts them to text.

  4. Thin Provisioning in ESX 3.5

    🏷️ vmware-vsphere

    One of the nice new features of vSphere 4 is thin provisioning of virtual disks. Thin provisioned (TP) disks will be familiar if you've ever used VMware Workstation where they are used by default, (you need to select Allocate all disk space now to create thick disks).…