连接minikube时出现‘Powershell Module Unavailable’错误,请求协助
Fix: "Hyper-V PowerShell Module is not available" Error When Starting a Host
Hey there, I’ve dealt with this exact error a few times—let’s work through the fixes step by step to get your host up and running again.
Step 1: Make Sure Hyper-V is Enabled on Your System
The most common reason the module is missing is that Hyper-V itself isn’t turned on. Here’s how to check and enable it:
- Open PowerShell as Administrator (right-click Start → Windows PowerShell (Admin)).
- Run this command to check Hyper-V’s status:
Get-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V* - If you see
State: Disabledfor the main Hyper-V feature, enable it with:Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All - Restart your computer when prompted—this is non-negotiable for the changes to stick.
Step 2: Check and Load the Hyper-V PowerShell Module
If Hyper-V is enabled but the module still isn’t detected:
- In the admin PowerShell window, run this to list available Hyper-V modules:
Get-Module -ListAvailable Hyper-V - If the module shows up, manually load it with:
Import-Module Hyper-V - If the module doesn’t appear at all, double-check your Windows edition: Hyper-V is only included in Pro, Enterprise, or Education versions of Windows 10/11—Home edition doesn’t support it by default.
Step 3: Adjust PowerShell’s Execution Policy
A restrictive policy can block module loading. Let’s tweak that:
- In admin PowerShell, check your current policy:
Get-ExecutionPolicy - If it shows
Restricted, change it toRemoteSigned(this lets local scripts run safely):Set-ExecutionPolicy RemoteSigned - Press
Yand Enter to confirm the change.
Step 4: Repair Corrupted Hyper-V Components
If the above steps don’t work, there might be a broken Hyper-V installation. Try resetting it:
- Disable Hyper-V first:
Disable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-All - Restart your computer.
- Re-enable Hyper-V using the command from Step 1, then restart again.
Quick Reminders
- Always use an admin PowerShell window for these steps—regular user accounts don’t have permission to modify Hyper-V settings.
- If you’re on Windows Home edition, you’ll need to upgrade to Pro/Enterprise or switch to a virtualization tool like VirtualBox instead of Hyper-V.
内容的提问来源于stack exchange,提问作者Manojkumar J
相关产品推荐
相关产品推荐

