Skip to content

Instantly share code, notes, and snippets.

@Ridley-nelson17
Created June 13, 2023 12:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Ridley-nelson17/1cd25fcd29b6dbd0ee91b3d1899b7e79 to your computer and use it in GitHub Desktop.
Save Ridley-nelson17/1cd25fcd29b6dbd0ee91b3d1899b7e79 to your computer and use it in GitHub Desktop.
Fixes the error on some computers when trying to enable Hyper-V
pushd "%~dp0"
dir /b %SystemRoot%\servicing\Packages\*Hyper-V*.mum >hyper-v.txt
for /f %%i in ('findstr /i . hyper-v.txt 2^>nul') do dism /online /norestart /add-package:"%SystemRoot%\servicing\Packages\%%i"
del hyper-v.txt
Dism /online /enable-feature /featurename:Microsoft-Hyper-V -All /LimitAccess /ALL
Pause
@Ridley-nelson17
Copy link
Author

If you still get an error post script, tinker around with the registry keys

@Ridley-nelson17
Copy link
Author

To fix the network interface interference while using Hyper-V, refer to: https://www.thewindowsclub.com/fix-error-applying-virtual-switch-properties-changes-in-hyper-v

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment