---
title: "Enabling and Disabling Hyper-V in Powershell — Ivan Kahl"
description: "Running VirtualBox or other virtualization software on Windows 10 often means turning Hyper-V off. Two PowerShell commands make enabling and disabling it quick."
url: https://ivankahl.com/blog/enabling-and-disabling-hyper-v-in-powershell/
published: 2019-03-27T00:00:00.000Z
tags:
  - "Windows"
  - "Powershell"
---

27 Mar 2019 · 1 min read

# Enabling and Disabling Hyper-V in Powershell

Running VirtualBox or other virtualization software on Windows 10 often means turning Hyper-V off. Two PowerShell commands make enabling and disabling it quick.

I sometimes find myself having to disable Hyper-V in Windows 10 temporarily in order to run some other virtualization software like VirtualBox. While it is possible to enable and disable Hyper-V in Window Features, I find it a lot more convenient running a Powershell command to enable and disable it.

## Solution

1.  Open an elevated Powershell window. You can do this by searching for Windows Powershell in the search menu, right-clicking it and selecting Run as administrator  
    ![Run Windows Powershell as an administrator](https://blog.ivankahl.com/content/images/2019/03/download.png)
    
2.  Run the following commands to enable/disable Hyper-V:
    
    **Enable Hyper-V**
    
    ```ps
    Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V –All
    ```
    
    **Disable Hyper-V**
    
    ```ps
    Disable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-All
    ```
    
3.  Restart your computer for the changes to take effect.
    

## Closing

I hope you found this article useful. Please [contact me](https://blog.ivankahl.com/contact-me/) if you have any questions or suggestions.

Tags: [Windows](https://ivankahl.com/blog/tags/windows/), [Powershell](https://ivankahl.com/blog/tags/powershell/)
