From a8abb6898cd349329021a80c35483a9dcd43b8bf Mon Sep 17 00:00:00 2001 From: Chris Roberts Date: Mon, 18 Jun 2018 09:09:01 -0700 Subject: [PATCH] Fix PowerShell cmdlet name for clones --- .../providers/hyperv/scripts/utils/VagrantVM/VagrantVM.psm1 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/providers/hyperv/scripts/utils/VagrantVM/VagrantVM.psm1 b/plugins/providers/hyperv/scripts/utils/VagrantVM/VagrantVM.psm1 index a380a38f3..fd11bdba1 100644 --- a/plugins/providers/hyperv/scripts/utils/VagrantVM/VagrantVM.psm1 +++ b/plugins/providers/hyperv/scripts/utils/VagrantVM/VagrantVM.psm1 @@ -1,3 +1,6 @@ +# Always stop when errors are encountered unless instructed not to +$ErrorActionPreference = "Stop" + # Vagrant VM creation functions function New-VagrantVM { @@ -123,7 +126,7 @@ function New-VagrantVMVMCX { $Path = $Drive.Path Hyper-V\Remove-VMHardDiskDrive $Drive Hyper-V\New-VHD -Path $DestinationPath -ParentPath $SourcePath - Hyper-V\AddVMHardDiskDrive -VM $VM -Path $DestinationPath + Hyper-V\Add-VMHardDiskDrive -VM $VM -Path $DestinationPath break } }