Powershell Script to Shutdown and Export Hyper-V VMs, one at a time.

Powershell Script to Shutdown and Export Hyper-V VMs, one at a time.

by Stan Czerno 21. July 2011 18:17

The script requires the PowerShell Management Library for Hyper-V for it to work. The PowerShell Management Library for Hyper-V can be downloaded at http://pshyperv.codeplex.com/

Be sure to read the documentation before using:

http://pshyperv.codeplex.com/releases/view/62842

http://pshyperv.codeplex.com/releases/view/38769

This is how I backup the VMs on my Two-Node Hyper-V Cluster. I can afford for my servers to be down while this is done and some of my other resources are clustered so there is minimum down time.I also do System State Backups, Exchange Backups and SQL Backups in addition.

This script can be used on a Stand-Alone Hyper-V Server as well.

Let me know what you think about the script and if you have a better way of doing this.

 http://www.czerno.com/default.asp?inc=/html/windows/hyperv/cluster/HyperV_Export_VMs.asp

Tags:

Hyper-V

Comments (1) -

Stan Czerno
Stan Czerno United States
7/28/2011 1:50:57 PM #

I made a few changes to the script. One of my VMs intergrated services were not responding so the machine could not be shutdown.

I added a HeartBeat check to the script as well as to determine if the VM is already stopped.

Add comment

  Country flag

biuquote
  • Comment
  • Preview
Loading

Category list

RecentComments

Comment RSS