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 DSC and built-in resources


Windows Server 2016 comes with a limited set of built-in DSC resources. In this recipe, you explore the built-in DSC resources and then write and deploy a simple configuration to a single node. The recipe also examines changes in configuration.

Getting ready

In this recipe, you examine the Windows Server 2016 built-in resources and use these to create and compile a configuration statement on server SRV1. You use this configuration statement to then deploy the Web-Server feature on a second server, SRV2.

This recipe relies on two files being created and shared from DC1. The two files are Index.Htm, and Page2.Htm. These two files are created and shared as \\DC1\ReskitApp. The first file, Index.HTM contains the following:

<!DOCTYPE html>
<html>
<head><title>Main Page - ReskitApp Application</title></head>
<body><p><center>
   <b>HOME PAGE FOR RESKITAPP APPLICATION</b></p>
   This is the root...