Book Image

Windows Server 2016 Cookbook

By : Jordan Krause
Book Image

Windows Server 2016 Cookbook

By: Jordan Krause

Overview of this book

This hands-on Cookbook is stuffed full of practical recipes that will help you handle the essential administrative tasks in Windows Server 2016. You’ll start by familiarizing yourself with the look and feel of Windows Server 2016, and will then learn how to navigate through some daily tasks using the graphical interface. You will see how to compose optimal Group Policies and facilitate task automation with PowerShell 5.0 scripting. We will also take a look at the functions available to provide remote network access to your traveling users, and explore the much anticipated Nano Server and Hyper-V built-in integration support that is brand new in Windows Server 2016. By the end of this book, you will know how to take your Windows Server 2016-powered server and turn it into any common infrastructure role that might be required in your company.
Table of Contents (18 chapters)
Windows Server 2016 Cookbook
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface

Installing the Web Server role with PowerShell


If you haven't started using PowerShell to accomplish some of your regular Windows Server tasks, do it now! PowerShell can be used in Windows Server 2016 to accomplish any task or configuration inside the operating system. I am a huge fan of using the keyboard instead of the mouse in any circumstance, and saving scripts that can be used over and over to save time in the future.

In this recipe, we are going to explore the Install-WindowsFeature cmdlet, which can be used to add a role or roles to your Server 2016. Since we are discussing IIS in this chapter, let's take our newly created web server and use PowerShell to place the Web Server (IIS) role onto it.

Getting ready

There is a new Windows Server 2016 web server in our environment called WEB2. Let's use PowerShell on this machine in order to install the IIS role.

How to do it…

To add the Web Server (IIS) role to WEB2 via PowerShell, follow these steps:

  1. Log in to WEB2 and open a PowerShell prompt...