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

9 lines
170 B
PowerShell

Param(
[Parameter(Mandatory=$true)]
[string]$VmId,
[string]$SnapName
)
$VM = Get-VM -Id $VmId -ErrorAction "Stop"
Checkpoint-VM $VM -SnapshotName $SnapName