Posted On December 22, 2021

PowerShell: Quick Snippet to Remove Virtual Machine Snapshots in VMM

kimconnect 0 comments
blog.KimConnect.com >> Codes , Virtualization >> 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 *

Related Post

Basic CSS: Use Hex Code for Specific Colors

<style>body {background-color: black;}</style>

Resolving Guest Virtual Machine Critical Status in Hyper-V Manager

Part A: Validating problem as VM in Critical Status # Check VM Status in Hyper-V…

PowerShell: Update Local Windows Using COM Objects – Legacy Compatible

Although this function requires 'interactive' or console sessions, it can be trigged by Windows Scheduled…
Other project: DragonCoin.com