hashicorp/vagrant · error · VagrantPlugins::HyperV::Errors::PowerShellFeaturesDisabled
The Hyper-V cmdlets for PowerShell are not available! Vagran
Error message
The Hyper-V cmdlets for PowerShell are not available! Vagrant requires these to control Hyper-V. Please enable them in the "Windows Features" control panel and try again.
What it means
The Hyper-V provider's CheckEnabled action runs check_hyperv.ps1 through the driver before any VM work; if the Hyper-V PowerShell cmdlets are not usable (result false), PowerShellFeaturesDisabled aborts the run with instructions to enable them in Windows Features.
Source
Thrown at plugins/providers/hyperv/action/check_enabled.rb:18
# Copyright IBM Corp. 2010, 2025
# SPDX-License-Identifier: BUSL-1.1
require "fileutils"
require "log4r"
module VagrantPlugins
module HyperV
module Action
class CheckEnabled
def initialize(app, env)
@app = app
end
def call(env)
env[:ui].output("Verifying Hyper-V is enabled...")
result = env[:machine].provider.driver.execute("check_hyperv.ps1", {})
raise Errors::PowerShellFeaturesDisabled if !result["result"]
@app.call(env)
end
end
end
end
end
View on GitHub (pinned to 35f3160f4a)
Solutions
- Enable the full feature set: Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-All (admin shell, then reboot)
- Or use 'Turn Windows features on or off' and enable every Hyper-V child node including the PowerShell module
- Confirm the Windows edition supports Hyper-V (Pro/Enterprise/Education/Server)
- Verify with `Get-Command Get-VM` in PowerShell before retrying vagrant
Defensive patterns
Strategy: validation
Validate before calling
powershell -NoProfile -Command "Get-Command Get-VM" >/dev/null 2>&1 \ || echo 'Hyper-V PowerShell tools missing: enable Microsoft-Hyper-V-All first'
Prevention
- Enable Microsoft-Hyper-V-All (role + management tools + PowerShell module) as part of host provisioning
- Verify with Get-Command Get-VM in bootstrap scripts before any vagrant hyperv run
- Remember Windows Home cannot host Hyper-V - provision a capable host instead
When it happens
Trigger: `vagrant up --provider=hyperv` on Windows where the Hyper-V role or its management tools - specifically the Hyper-V PowerShell module - are absent or only partially enabled.
Common situations: Fresh Windows installs; Windows Home editions (Hyper-V unsupported); installs that ticked the Hyper-V node but left the PowerShell management tools unchecked.
Related errors
- A command must be provided when the --elevated flag is provi
- Your host does not support PowerShell. A remote PowerShell c
- Hyper-V access check has failed for the configured destinati
- An error occurred while executing a PowerShell script. This
- Failed to locate the powershell executable on the available
AI-assisted analysis of hashicorp/vagrant@35f3160f4a (2026-08-21).
Data as JSON: /api/errors/8665e38ac8eca726.
Report an issue: GitHub.