Installing and configuring Hyper-V using PowerShell
Before you proceed with the installation and configuration of Hyper-V, there are some prerequisites that need to be taken care of:
- The user account that is used to install the Hyper-V role should have administrative privileges on the computer
- There should be enough RAM on the server to run newly created virtual machines
Once the prerequisites have been taken care of, let's start with installing the Hyper-V role:
- Open a PowerShell prompt in Run as Administrator mode:
- Type the following into the PowerShell prompt to install the Hyper-V role along with the management tools; once the installation is complete, the Hyper-V Server will reboot and the Hyper-V role will be successfully installed:
Install-WindowsFeature –Name Hyper-V -IncludeManagementTools -Restart
- Once the server boots up, verify the installation of Hyper-V using the
Get-WindowsFeature
cmdlet:Get-WindowsFeature -Name hyper*
You will be able to see that the Hyper-V role, Hyper-V PowerShell management shell, and the GUI management tools are successfully installed: