PowerShell: Quick Snippet to Remove Virtual Machine Snapshots in VMM

$vmNames=@(
    'MACHINE1',
    'MACHINE2'
)
foreach($vmName in $vmNames){
    $checkpoint = Get-SCVMCheckpoint -VM $vmName
    if($checkpoint){$checkpoint|%{Remove-SCVMCheckpoint -VMCheckpoint $_ -Confirm:$false}}else{write-host "$vmName is skipped."}
}

Leave a Reply

Your email address will not be published. Required fields are marked *