...hopefully some useful VMware related stuff

Take Snapshot of a Virtual Machine

19/11/2009 12:00

This script takes a basic snapshot of a virtual machine, it is a quick script and doesn't quiesce or snapshot the memory of the virtual machine.

Use this if you need to take a quick snapshot of a VM before making changes if you don't want to log in to vCenter.

Enter the VM name and a name for the Snapshot when prompted.

The script is HERE and attached below.

 

 

# Create a basic snapshot of a Virtual Machine
# 20091119

$vmname = read-host "Enter VM Name to take Snapshot of"
$snapshotname = read-host "Enter a name for the snapshot"
New-Snapshot -VM(Get-VM -Name "$vmname") -Name $snapshotname

 

Search site