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 JavaScript: Escaping Literal Quotes in Strings

var myStr = "Yo Mama said, \"have some cookies\"";

JavaScript: Pomodoro Clock

Demo: Pomodoro Clock HTML Code: <body> <div class="header"> <h1>Pomodoro Timer</h1> <h2>A Free Code Camp Student…

Setting Up Python on a Windows Machine

# Install Visual C++ 14choco install vcredist2017 -y# Install Python 3.8choco install python --version=3.8 -y#…