From 587c88e65ae294c4f2939937c2079c545efd17cb Mon Sep 17 00:00:00 2001 From: Mike Averto Date: Sun, 9 Aug 2015 12:44:49 -0400 Subject: [PATCH] Fix Win 10 Enterprise Vagrant Error This fixes error for Win 10 Enterprise: An error occurred while executing a PowerShell script. This error is shown below. Please read the error message and see if this is a configuration error with your system. If it is not, then please report a bug. Script: get_vm_status.ps1 Error: C:\HashiCorp\Vagrant\embedded\gems\gems\vagrant-1.7.4\plugins\providers\hyperv\scripts\get_vm_status.ps1 : Unable to find type [Microsoft.HyperV.PowerShell.VirtualizationOperationFailedException]. At line:1 char:1 + &('C:\HashiCorp\Vagrant\embedded\gems\gems\vagrant-1.7.4\plugins\prov ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (Microsoft.Hyper...FailedException:TypeName) [get_vm_status.ps1], Ru ntimeException + FullyQualifiedErrorId : TypeNotFound,get_vm_status.ps1 --- plugins/providers/hyperv/scripts/get_vm_status.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/providers/hyperv/scripts/get_vm_status.ps1 b/plugins/providers/hyperv/scripts/get_vm_status.ps1 index 739560190..5c1e1aa73 100644 --- a/plugins/providers/hyperv/scripts/get_vm_status.ps1 +++ b/plugins/providers/hyperv/scripts/get_vm_status.ps1 @@ -12,7 +12,7 @@ try { $VM = Get-VM -Id $VmId -ErrorAction "Stop" $State = $VM.state $Status = $VM.status -} catch [Microsoft.HyperV.PowerShell.VirtualizationOperationFailedException] { +} catch [Microsoft.HyperV.PowerShell.VirtualizationException] { $State = "not_created" $Status = $State }