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

9 lines
195 B
PowerShell

Param(
[Parameter(Mandatory=$true)]
[string]$VmId
)
# Shuts down virtual machine regardless of any unsaved application data
$VM = Get-VM -Id $VmId -ErrorAction "Stop"
Stop-VM $VM -Force