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 Windows Server Update Services


To use WSUS, you first install the Windows feature for update services, then perform the initial configuration. WSUS has dependencies that include the IIS web server and ASP.NET 4.6, so these dependencies are installed automatically if they are not present.

Getting ready

To follow this recipe, open a PowerShell session on server WSUS1. WSUS1 is a domain-joined server with internet access.

How to do it...

The steps for the recipe are as follows:

  1. Install the Windows Update feature and tools, with -Verbose for additional feedback:
Install-WindowsFeature -Name 'UpdateServices' `
      -IncludeManagementTools -Verbose
  1. Review the features that are installed on your server, noting that not only has Windows Software Update Services been installed, but Web Server (IIS), ASP.Net 4.6, and Windows Internal Database have as well:
      Get-WindowsFeature |
      Where-Object -FilterScript {($psitem.Installed)}
  1. Create a folder for WSUS update content:
      $WSUSContentDir...