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

Renaming and domain joining via PowerShell


Every server that you build will need a hostname, and most likely will need to be joined to your domain. We are all familiar with doing these things with the mouse using system properties, but have you ever thought of using a command interface to do these tasks quickly? Let's work together to discover how PowerShell can once again help make these necessary tasks more efficient.

Getting ready

We have just finished turning on a new Windows Server 2016 machine. Immediately following the mini-setup wizard in order to get logged into Windows, let's now use PowerShell to set our hostname and join the system to our domain.

How to do it…

Follow these steps to rename and domain join this new server with PowerShell:

  1. Right-click on your PowerShell icon on the Taskbar and choose Run as administrator:

  2. In order to rename our new server WEB2, input the following command. Using the -Restart flag will ensure that our server reboots following the name change:

    Rename-Computer...