Book Image

Microsoft Hyper-V PowerShell Automation

By : Vinith Menon
Book Image

Microsoft Hyper-V PowerShell Automation

By: Vinith Menon

Overview of this book

Table of Contents (13 chapters)
Microsoft Hyper-V PowerShell Automation
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

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:

  1. Open a PowerShell prompt in Run as Administrator mode:

  2. 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
    
  3. 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: