VM Junkie

March 12, 2009

PowerShell – Shutting Down an entire Infrastructure with vCenter as a VM

Filed under: esx, powershell, vmware — ermac318 @ 2:13 pm

Recently I wrote another PowerShell script to help automate something we do around here a lot. Most people probably don’t shut down their entire infrastructure terribly often, but at the company I work for we do a lot of demo environments, and we also do large demo events where we take a full pair of racks to a hotel to do technology demos. As such, we find ourselves shutting down everything rather often. This can be tricky sometimes, especially when vCenter is running as a VM.

I wrote the following script to shutdown all VMs running (except for vCenter), then shutdown all hosts not running vCenter’s VM, and then finishing up by connecting directly to the ESX box running vCenter to finish the job. This makes the process simple and repeatable. It even sets vCenter to autostart on the host its running on for when we need to power everything back on!

You can check it out on my Sky Drive.


1 Comment

  1. Any way that you could provide me a copy of the script that you wrote. It seems that your “Sky Drive” link is not accessible.


    Comment by Shawn B — August 26, 2009 @ 7:25 am

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.

Create a free website or blog at WordPress.com.

%d bloggers like this: