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

Docker: Staging Intermediary Containers

Benefits: - Smaller footprints of exposed containers- Less attack surfaces leads to minimum vulnerabilities- Job…

Windows Active Directory Snapshots

Set scheduled task to run daily and call this maintainSnapshots.bat file:------------------------------@echo offREM Logs Location (Used…

PowerShell: Administering Network Time Protocol Settings on Windows

Quick Script of Domain Joined Laptops and Desktops for Remote Users: # Set Domain Joined…
Other project: DragonCoin.com