Sha256: b763f0fcfd1f69d20da82950b3497128c2c24ff2f32d52e5a7ef192b57a322b0

Contents?: true

Size: 354 Bytes

Versions: 29

Compression:

Stored size: 354 Bytes

Contents

#Requires -Modules VagrantMessages

Param(
    [Parameter(Mandatory=$true)]
    [string]$VmId
)

$ErrorActionPreference = "Stop"

try{
    # Shuts down virtual machine regardless of any unsaved application data
    $VM = Hyper-V\Get-VM -Id $VmId
    Hyper-V\Stop-VM $VM -Force
} catch {
    Write-ErrorMessage "Failed to stop VM: ${PSItem}"
    exit 1
}

Version data entries

29 entries across 25 versions & 4 rubygems

Version Path
vagrant-unbundled-2.2.0.0 plugins/providers/hyperv/scripts/stop_vm.ps1
vagrant-unbundled-2.1.4.0 plugins/providers/hyperv/scripts/stop_vm.ps1
vagrant-unbundled-2.1.2.0 plugins/providers/hyperv/scripts/stop_vm.ps1
vagrant-packet-0.1.2 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-04f7215b5e3f/plugins/providers/hyperv/scripts/stop_vm.ps1
vagrant-packet-0.1.2 vendor/bundle/ruby/2.4.0/bundler/gems/vagrant-04f7215b5e3f/plugins/providers/hyperv/scripts/stop_vm.ps1
vagrant-packet-0.1.2 vendor/bundle/ruby/2.5.0/bundler/gems/vagrant-04f7215b5e3f/plugins/providers/hyperv/scripts/stop_vm.ps1
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/bundler/gems/vagrant-04f7215b5e3f/plugins/providers/hyperv/scripts/stop_vm.ps1
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/bundler/gems/vagrant-04f7215b5e3f/plugins/providers/hyperv/scripts/stop_vm.ps1
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/bundler/gems/vagrant-04f7215b5e3f/plugins/providers/hyperv/scripts/stop_vm.ps1