- I am not responsible for bricked devices, dead drives.
- Thermonuclear War or you getting fired because the Reminder/Mail app failed.
- Before running the script! YOU are choosing to make these modifications.
- I’ve tried it and it worked for me. Hence sharing with you.
- Use at your own risk.
- "Step 1" is a must for people who are going down this path. Don’t skip it
Step 0: - Check if virtualization is enabled in firmware
Check your BIOS / UEFI, look for option intel VTX / AMD AMDV.
If your Virtual Box or VMware is running fine without issues skip the above step.(I am not talking about issues with Switch. Just check if your machine boots, that is fine, proceed to step 0.5)
Step 0.5: - Check if you have packages of Hyper-V in your System.
- C:\Windows\servicing\Packages Go to this path and search for Hyper-V files.
- If you have such files then proceed further.
Step 1: - Create a system restore point (in case something/everything goes wrong).
Search for Create a restore point , and click the top result to open the System Properties experience.
Under the “Protection Settings” section, select the main “System” drive, and click the Configure button.
- Select the Turn on system protection option.
- Quick tip: Windows 10 can manage the space automatically, but under the “Disk Space Usage” section, you can also use the slider to specify the maximum amount of storage to reserve for System Restore.
Click the Apply button.
Click the OK button.
- Again open start and search for create restore point.
- Under the “Protection Settings” section, click the Create button.
- Type a descriptive name for the restore point — for example, before running Hyper-V script .
- Click the Create button.
I repeat. "DON’T SKIP STEP 1"
Step 2: - Create a Batch File to Run the Script.
Open CMD as Administrator.
notepad vir.batand press ENTER. This will open a notepad file. Click Yes on the prompt.
YOU STILL HAVE A CHOICE. DON’T SKIP “STEP 1”.
- Paste the code given below as it is in the notepad file we just created.
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
Save the file (ctrl+s). Then close the notepad.
vir.baton the CMD which is already open and press ENTER.
- This will run the script.
read the Disclaimer at top if you have skipped step 1 and ran the script.
- After completion, close the CMD and Restart the PC/Laptop.
Step 3: - Check if you have got Hyper-V installed on your PC/Laptop.
Search for Hyper-V Manager.
If you can see Hyper-V, run it. No need to proceed further.
Enjoy MCSA lectures.
- If there is no entry of Hyper-V in start menu, Proceed further.
Step 4: - Enable Hyper-V from system.
Search for Turn Windows features on or off . Open it.
Search for Hyper-V and Tick the box beside it. Also click on “+” sign and tick the boxes beside expanded items.
- Search for Windows Hypervisor Platform and tick the box beside it.
- Click OK.
- This will enable Hyper-V.
Restart your PC/Laptop.
Now repeat Step 3.
If it enables Hyper-V on your PC/Laptop use it for MCSA. If it doesn’t, use VMware or VirtualBox.