diff --git a/src/windows/win-enable-nested-hyperv.ps1 b/src/windows/win-enable-nested-hyperv.ps1 index 56eb16c..287586d 100644 --- a/src/windows/win-enable-nested-hyperv.ps1 +++ b/src/windows/win-enable-nested-hyperv.ps1 @@ -122,6 +122,8 @@ else $return = install-windowsfeature -name Hyper-V -IncludeManagementTools -ErrorAction Stop } catch { + # Handle the exception here + Write-Host "An error occurred: $_" throw $_ return $STATUS_ERROR }