Sha256: 0f763b4e15aebf132c1823d455b7febe6588b8fa36e499302283c9cb0985f03c
Contents?: true
Size: 519 Bytes
Versions: 29
Compression:
Stored size: 519 Bytes
Contents
#Requires -Modules VagrantMessages param ( [parameter (Mandatory=$true)] [string]$VmId ) $ErrorActionPreference = "Stop" try { $vm = Hyper-V\Get-VM -Id $VmId Hyper-V\Start-VM $vm $state = $vm.state $status = $vm.status $name = $vm.name $resultHash = @{ state = "$state" status = "$status" name = "$name" } $result = ConvertTo-Json $resultHash Write-OutputMessage $result } catch { Write-ErrorMessage "Failed to start VM ${PSItem}" exit 1 }
Version data entries
29 entries across 25 versions & 4 rubygems