vagrant/plugins/providers/hyperv/scripts/delete_snapshot.ps1

9 lines
182 B
PowerShell

Param(
[Parameter(Mandatory=$true)]
[string]$VmId,
[string]$SnapName
)
$VM = Hyper-V\Get-VM -Id $VmId -ErrorAction "Stop"
Hyper-V\Remove-VMSnapshot $VM -Name $SnapName