9 lines
166 B
PowerShell
9 lines
166 B
PowerShell
|
Param(
|
||
|
[Parameter(Mandatory=$true)]
|
||
|
[string]$VmId,
|
||
|
[string]$SnapName
|
||
|
)
|
||
|
|
||
|
$VM = Get-VM -Id $VmId -ErrorAction "Stop"
|
||
|
Remove-VMSnapshot $VM -Name $SnapName
|