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 with PSGallery resources


In the Finding and installing DSC resources recipe, you downloaded a module, xWebAdministration, which contains a number of DSC resources. In this recipe, you use the resources in this module to create an IIS web application. You create and run this recipe from SRV1 to configure a web application on SRV2. You obtain the source files for the web application from DC1.

Getting ready

With this recipe, you configure IIS on SRV2 to support a simple web application—a similar application. To test this recipe, you need two source files, which you store on the ReskitApp share on your DC1 computer. The first, Index.Htm contains the following:

<!DOCTYPE html> 
<html> 
<head><meta charset="utf-8" /> 
<title>Main Page of The ReskitApp Application</title> 
</head> 
<body></p> 
<br> 
<center> 
<b>Home Page for ReskitApp Application</b></p> 
The home page of the ReskitApp application pushed...