Windows 10 Hyper-V, how to completely uninstall, reset all settings

hyper-vwindows 10

Running Windows 10 Pro, v1803 OS 17134.648, 64-bit.

I am having a problem with machines that I've previously installed into Hyper-V. I have successfully uninstalled Hyper-V, and have manually removed all vEthernet related NICs. From previous experience of going through this process, if I reinstall Hyper-V, it will remember a number of settings from the previous install, including but not limited to the VMs I had installed (which I have exported to a different location.)

What I want to do now that Hyper-V is uninstalled is to do a clean sweep of all settings. Find registry keys and delete them or reset them to the values they were at when I first enabled the Hyper-V feature. Same with any .vhd*, .avhd*, .xml, etc. files.

I need to get Hyper-V to a state where a new Quick Create VM from a clean (not imported) source runs clean (no boot issues), then I can look to import my exported VMs.

These are the (unsuccessful) steps I have taken so far in an attempt to reset everything back to "factory":

  • Uninstall Hyper-V using Windows Features
  • [Reboot]
  • Rename C:\ProgramData\Microsoft\Windows\Hyper-V folder
  • Rename C:\Users\Public\Documents\Hyper-V folder, if it exists
  • Rename C:\ProgramData\Microsoft\Event Viewer\Applications and Services Logs\Microsoft\Windows\Hyper-V-Hypervisor, if it exists
  • Rename C:\ProgramData\Microsoft\Event Viewer\Applications and Services Logs\Microsoft\Windows\Hyper-V-Worker, if it exists
  • Rename C:\Users[logged_in_user]\AppData\Roaming\Microsoft\Windows\Hyper-V
  • In Control Panel\All Control Panel Items\Network Connections
    • (Right-click Start icon, select Network Connections. Select Ethernet in the left navigation bar, then Change Adapter Options)
    • right-click on "vEtnernet (Default Switch)", Properties, Configure…, Driver, Uninstall Device
  • RegEdit (as Admin)
    • Change owner of HKLM\SOFTWARE\Classes\CLSID\{76A64158-CB41-11D1-8B02-00600806D9B6} from TrustedInstaller to Administrators
    • Confirm that HKLM\SOFTWARE\Classes\CLSID\{76A64158-CB41-11D1-8B02-00600806D9B6}\TypeLib Default value is {565783C6-CB41-11D1-8B02-00600806D9B6} – Change HKLM\SOFTWARE\Classes\CLSID\{76A64158-CB41-11D1-8B02-00600806D9B6}\InProcServer32\ThreadingModel from Apartment to Both
    • Add HKLM\SOFTWARE\Classes\CLSID\{76A64158-CB41-11D1-8B02-00600806D9B6}\AppID = {76A64158-CB41-11D1-8B02-00600806D9B6}
    • Add HKLM\SOFTWARE\Classes\AppID\{76A64158-CB41-11D1-8B02-00600806D9B6} Subkey
    • Add empty string value HKLM\SOFTWARE\Classes\AppID\{76A64158-CB41-11D1-8B02-00600806D9B6}\DllSurrogate
  • After doing all of this, found https://wiki.abiquo.com/display/ABI26/Hyper-V+Cloud+Node+Configuration, where they automate all of the above in a Powershell Script and Registry Import file
    • Download and run the script to ensure I didn't mess anything up.
    • (Other options don't apply to Windows 10 Pro, or running Hyper-V locally, or when Hyper-V hasn't been installed yet.)
  • [Reboot]
  • Reinstall Hyper-V using Windows Features
  • [Reboot]

Best Answer

I'm pretty sure you just delete the configs and the dir content.

You can force it with dism

dism /online /Disable-Feature /FeatureName:Microsoft-Hyper-V

then just

dism /online /Enable-Feature /FeatureName:Microsoft-Hyper-V

Related Question