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

Using Windows PowerShell Direct


PowerShell Direct (PSD) is a new feature with Windows Server 2016 (and on Windows 10 Anniversary Update or later). PSD enables you to use PowerShell remoting to access a Hyper-V VM without needing to setup networking and firewall settings. With PSD, you use Invoke-Command, specifying either the VM's name or the VM's VMID (the VMID is a GUID used internally by Hyper-V to identify a VM). You can also use the VM name or VMID to enter a remote session using Enter-PSSession.

In previous versions of Hyper-V, you needed some sort of networking connection between your Hyper-V host and the guest OS in order to remote into the guest. This was often setting up firewall exceptions and establishing network connectivity. With PSD, you can use the VM's name or ID and remote straight in.

Getting ready

For this recipe, you need a Hyper-V Host running on either Windows 10 Anniversary Update (or later) or Windows Server 2016, with Hyper-V loaded and operational. Additionally, you...