diff --git a/lib/vagrant/util/platform.rb b/lib/vagrant/util/platform.rb index af24cd014..6e9f993f3 100644 --- a/lib/vagrant/util/platform.rb +++ b/lib/vagrant/util/platform.rb @@ -107,9 +107,12 @@ module Vagrant return @_windows_hyperv_enabled if defined?(@_windows_hyperv_enabled) @_windows_hyperv_enabled = -> { - ps_cmd = "$(Get-WindowsOptionalFeature -FeatureName Microsoft-Hyper-V-All -Online).State" - output = Vagrant::Util::PowerShell.execute_cmd(ps_cmd) - return output == 'Enabled' + ["Get-WindowsOptionalFeature", "Get-WindowsFeature"].each do |cmd_name| + ps_cmd = "$(#{cmd_name} -FeatureName Microsoft-Hyper-V-Hypervisor).State" + output = Vagrant::Util::PowerShell.execute_cmd(ps_cmd) + return true if output == "Enabled" + end + return false }.call return @_windows_hyperv_enabled