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

PowerShell: How to Quickly Ping a Target

Method 1: Legacy ping command # Legacy method that works without any fusses $pingResult=ping google.com…

Basic HTML and HTML5: Create an Ordered List

<h2>CatPhotoApp</h2><main><p>Click here to view more <a href="#">cat photos</a>.</p><a href="#"><img src="https://bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying…

Basic CSS: Use RGB values to Color Elements

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