Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ------------------------------
- Steps
- ------------------------------
- 1. Create new text file named "HYPER-V Package Installer" (or whatever) somwhere in your files.
- 2. Copy text below:
- 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
- 3. Rename file extension from ".txt" to ".bat"
- 4. Right click -> Run as administrator
- ------------------------------
- Explanation
- ------------------------------
- 1.) Look for Hyper V Packages
- The Script looks into the Folder %SystemRoot%\servicing\Packages\ and search for the Hyper-V-Packages and writes them into a TextFile (hyper-v.txt)
- 2.) Add Hyper Packages
- For each line (Hyper-V-Package) its execute “dism /online /norestart /add-package:"%SystemRoot%\servicing\Packages\[Hyper-V-Package]”
- 3.) Delete hyper-v.txt
- 4.) Enable Hyper V Feature
- Execute Dism /online /enable-feature /featurename:Microsoft-Hyper-V-All /LimitAccess /ALL
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement