Snapshot management with Windows PowerShell
On a Microsoft Hyper-V
system, you can use Windows PowerShell cmdlets
to remove (undo) snapshots that were created
by IBM
Spectrum Protect for
a Hyper-V virtual machine.
You can use these cmdlets only on the Hyper-V system. You cannot remove snapshots from the Microsoft System Center Virtual Machine Manager.
Hyper-V systems issue cautionary messages to discourage you from editing virtual hard disks that contain snapshots, or virtual hard disks that are associated with a chain of differencing (incremental-forever) snapshots. Instead, use the cmdlets to manage snapshots to minimize the risk of data loss.
For a list of cmdlets that are available for Hyper-V, go to http://technet.microsoft.com/en-us/library/hh848559.aspx and read the information for the available cmdlets. Use the Get-VMSnapshot cmdlet with the -SnapshotType Recovery parameter to retrieve snapshots that are associated with a virtual machine (VM). Use the Remove-VMSnapshot cmdlet to remove a snapshot. Removing a snapshot merges the information that the snapshot wrote to the snapshot differences file (the AVHDX file) back to the VM hard disk (the VHDX file).
get-vmsnapshot * | where snapshottype -eq recovery | remove-vmsnapshot