Book Image

Windows Server 2016 Automation with PowerShell Cookbook - Second Edition

By : Thomas Lee, Ed Goad
Book Image

Windows Server 2016 Automation with PowerShell Cookbook - Second Edition

By: Thomas Lee, Ed Goad

Overview of this book

This book showcases several ways that Windows administrators can use to automate and streamline their job. You'll start with the PowerShell and Windows Server fundamentals, where you'll become well versed with PowerShell and Windows Server features. In the next module, Core Windows Server 2016, you'll implement Nano Server, manage Windows updates, and implement troubleshooting and server inventories. You'll then move on to the Networking module, where you'll manage Windows network services and network shares. The last module covers Azure and DSC, where you will use Azure on PowerShell and DSC to easily maintain Windows servers.
Table of Contents (21 chapters)
Title Page
Credits
About the Author
Acknowledgment
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface

Installing and configuring Hyper-V feature


To install Hyper-V on Windows Server 2016, you install the Hyper-V feature. In this recipe, you do the set up remotely from a client machine using the Hyper-V cmdlets and PowerShell's remoting capabilities.

Getting ready

For this recipe, you need to have the host computers on which you install Hyper-V. This recipe uses two servers, HV1 and HV2. Each server is a member of the domain on which you have added no additional services. As an alternative to having two systems running, you could use embedded Hyper-V and create the two VMs inside a third.

To demonstrate remote configuration, you perform this recipe from a third computer, CL1 running Windows 10 (Anniversary Update). This recipe makes use of a second hard disk, an H: drive on the HV1 and HV2 systems that you use to store Hyper-V VMs and virtual disks.

You need the Hyper-V tools on CL1—add them using the Enable-WindowsOptionalFeature and use the -Online switch, as follows:

# Add windows optional...