{"record":{"id":"8665e38ac8eca726","repo":"hashicorp/vagrant","slug":"the-hyper-v-cmdlets-for-powershell-are-not-availab","errorCode":null,"errorMessage":"The Hyper-V cmdlets for PowerShell are not available! Vagrant\nrequires these to control Hyper-V. Please enable them in the\n\"Windows Features\" control panel and try again.","messagePattern":"The Hyper-V cmdlets for PowerShell are not available! Vagrant\nrequires these to control Hyper-V\\. Please enable them in the\n\"Windows Features\" control panel and try again\\.","errorType":"exception","errorClass":"VagrantPlugins::HyperV::Errors::PowerShellFeaturesDisabled","httpStatus":null,"severity":"error","filePath":"plugins/providers/hyperv/action/check_enabled.rb","lineNumber":18,"sourceCode":"# Copyright IBM Corp. 2010, 2025\n# SPDX-License-Identifier: BUSL-1.1\n\nrequire \"fileutils\"\nrequire \"log4r\"\n\nmodule VagrantPlugins\n  module HyperV\n    module Action\n      class CheckEnabled\n        def initialize(app, env)\n          @app    = app\n        end\n\n        def call(env)\n          env[:ui].output(\"Verifying Hyper-V is enabled...\")\n          result = env[:machine].provider.driver.execute(\"check_hyperv.ps1\", {})\n          raise Errors::PowerShellFeaturesDisabled if !result[\"result\"]\n\n          @app.call(env)\n        end\n      end\n    end\n  end\nend\n","sourceCodeStart":1,"sourceCodeEnd":26,"githubUrl":"https://github.com/hashicorp/vagrant/blob/35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5/plugins/providers/hyperv/action/check_enabled.rb#L1-L26","documentation":"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.","triggerScenarios":"`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.","commonSituations":"Fresh Windows installs; Windows Home editions (Hyper-V unsupported); installs that ticked the Hyper-V node but left the PowerShell management tools unchecked.","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"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"powershell -NoProfile -Command \"Get-Command Get-VM\" >/dev/null 2>&1 \\\n  || echo 'Hyper-V PowerShell tools missing: enable Microsoft-Hyper-V-All first'","typeGuard":null,"tryCatchPattern":null,"preventionTips":["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"],"tags":["vagrant","hyperv","windows","powershell","setup"],"backgroundTag":"optional-feature-not-enabled","analyzedSha":"35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5","analyzedAt":"2026-08-21T13:34:32.514Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}