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

Creating and using Azure virtual machines


An Azure VM is essentially a Hyper-V VM that you run within Azure. There are some differences between Hyper-V VMs you create within Server 2016 (or Windows 10) and Azure VMs but they are minor. The ARM based cmdlets you use are a little different in style to Hyper-V cmdlets which may mean a bit of a learning curve.

At the time of writing, you can only use the VHD format for your virtual hard disks in an Azure VM although like many things in Azure this may change at some point in the future. Should you wish to move a Hyper-V VM into Azure that uses a VHDX hard disk file, you would need to convert the disk type to be a VHD.

In this recipe, you first create a virtual network. Your VM can have both a public IP address and a private VLAN based IP address. At the end of this recipe, you access the VM via the VM's public IP address. In a later recipe, you create a VPN and connect to the VM using the VPN addresses. You also create a NIC and give it a public...