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 IIS


Before you can use IIS, you must install it onto your host. Like other roles/features of Windows Server 2016 covered in this book, you install IIS by using the Install-WindowsFeature cmdlet. Once you have installed the web server, you take a look at the host after the installation is complete.

Getting ready

You run this recipe on SRV1, a member server running Windows Server 2016. This server is a server in the Reskit.Org domain.

How to do it...

  1. Open a PowerShell console and install the Web-Server and all sub-features:
Install-WindowsFeature -Name Web-Server `                         -IncludeAllSubFeature `                         -IncludeManagementTools
  1. See what web related features are installed on SRV1:
Get-WindowsFeature -Name Web* | Where-Object Installed
  1. Check the WebAdministration module and discover how many commands are in the module:
Get-Module -Name WebAdministration -ListAvailable
      Get-Command -Module webadministration |      Measure-Object |      Select-Object count...