How it works...

In step 1, you install WSUS by installing the UpdateServices feature. Note the link for additional configuration instructions:

In step 2, you review what has been installed on your server by piping the results of Get-WindowsFeature to Where-Object, which filters the object passed in the pipeline. This object is referenced by the $PSItem variable (or the shorter $_) variable, returning only those that are installed—that is, those whose Installed property is $true. Installing the UpdateServices Windows feature installed the prerequisites, such as Web Server (IIS), automatically:

In steps 3 and 4, you create a folder to hold ...

Get Windows Server 2016 Automation with PowerShell Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.