You are previewing Microsoft Hyper-V PowerShell Automation.
O'Reilly logo
Microsoft Hyper-V PowerShell Automation

Book Description

Manage, automate, and streamline your Hyper-V environment effectively with advanced PowerShell cmdlets

In Detail

Windows PowerShell is a task-based command-line shell and scripting language designed especially for system administration. Hyper-V is Microsoft's hypervisor that creates and runs virtual machines. Hyper-V for Windows PowerShell provides IT pros with an easy way to enable automation of management tasks within Windows Server. The Hyper-V PowerShell module includes several significant features that extend its use, improve its usability, and allow you to control and manage your Hyper-V environment with more granular control.

This book explores the new features made available with Hyper-V version 3, and breaks down the mystery and confusion that surrounds which feature to use and when. It also teaches you the PowerShell way to automate the usage of these features. It will take you through a number of practical examples that will help you take advantage of the Hyper-V version 3 cmdlets efficiently. You will also learn how to use Hyper-V version 3 PowerShell cmdlets to install and configure Hyper-V in a Windows Server environment and also learn about the various administration tasks in detail. You will learn everything you need to get started with administering your Hyper-V environment using PowerShell.

What You Will Learn

  • Understand and optimize the new features of Hyper-V on Windows Server 2012 R2

  • Install and configure your Hyper-V environment on a Windows Server environment using PowerShell

  • Extract information about Hyper-V hosts and the associated virtual machines

  • Create, delete, start, and stop virtual machines and configure their properties

  • Utilize Hyper-V PowerShell module cmdlets to create reusable PowerShell scripts

  • Integrate your Hyper-V environment for enterprise-level management using SCVMM to create and manage private clouds

  • Troubleshoot your Hyper-V environment with PowerShell and custom scripts

  • Downloading the example code for this book. You can download the example code files for all Packt books you have purchased from your account at http://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the files e-mailed directly to you.

    Table of Contents

    1. Microsoft Hyper-V PowerShell Automation
      1. Table of Contents
      2. Microsoft Hyper-V PowerShell Automation
      3. Credits
      4. About the Author
      5. About the Reviewers
      6. www.PacktPub.com
        1. Support files, eBooks, discount offers, and more
          1. Why subscribe?
          2. Free access for Packt account holders
          3. Instant updates on new Packt books
      7. Preface
        1. What this book covers
        2. What you need for this book
        3. Who this book is for
        4. Conventions
        5. Reader feedback
        6. Customer support
          1. Errata
          2. Piracy
          3. Questions
      8. 1. New PowerShell Cmdlets in Hyper-V on Windows Server 2012 R2
        1. Installing and configuring Hyper-V using PowerShell
        2. Fundamental concepts of Hyper-V management with the Hyper-V management shell
        3. Shared virtual hard disks
        4. Live virtual hard disk resizing
          1. Expanding the virtual hard disk
          2. Resizing the virtual hard disk
        5. The storage quality of the service feature
        6. Virtual machine generation
        7. Updated features in integration services
        8. Updated features for exporting a virtual machine
        9. Updated features in Hyper-V Replica
        10. Summary
      9. 2. Managing Your Hyper-V Virtual Infrastructure
        1. Extracting information about Hyper-V hosts and the associated virtual machines
        2. Creating, deleting, starting, and stopping virtual machines
          1. Creating a virtual machine
          2. Deleting a virtual machine
          3. Starting and stopping a virtual machine
        3. Configuring properties on virtual machines
          1. Managing VHDs on virtual machines
        4. Summary
      10. 3. Managing Your Hyper-V Virtual Machines
        1. Managing virtual switches and virtual network adapters
          1. Managing a virtual machine's migration networks
          2. Configuring virtual machine network adapters with a virtual switch
          3. Configuring virtual machine network failover settings
          4. Adding, removing, and renaming virtual machine network adapters
          5. Configuring a virtual machine's network adapter VLANs
          6. Configuring Hyper-V virtual switches and their properties
          7. Creating and removing Hyper-V virtual switches
          8. Managing virtual machine migrations
          9. Managing virtual machine imports, exports, and snapshots
          10. Importing and exporting virtual machines
          11. Managing virtual machine snapshots
          12. Managing virtual machine backups with Hyper-V Replica
        2. Managing virtual machine connections
        3. Summary
      11. 4. Creating Reusable PowerShell Scripts Using Hyper-V PowerShell Module Cmdlets
        1. Creating reusable scripts for virtual machine creation utilizing ODX
        2. Creating reusable scripts for virtual machine live migration
        3. Creating reusable scripts to manage export and import of virtual machine snapshots
        4. Creating reusable scripts to automate installation of Integration Service in virtual machines
        5. Summary
      12. 5. The Next Step – Integration with SCVMM
        1. Why integrate with SCVMM?
          1. Core fabric management
          2. Resource optimization
          3. Infrastructure enhancements
          4. Cloud management
        2. PowerShell cmdlets in integration with SCVMM
        3. Summary
      13. 6. Troubleshooting Hyper-V Environment Issues and Best Practices Using PowerShell
        1. Troubleshooting the Hyper-V environment using the event log
        2. Troubleshooting the Hyper-V environment using BPA
        3. The PowerShell community
        4. Summary
      14. Index