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

Tracking user logins with Logon/Logoff scripts


I have been working with RDS since before it was called RDS, and something that absolutely every single customer asks for is the ability to report on which users are connecting to which RDSH servers. Ideally, they would like to be able to see, historically, a list of people logging in, and sometimes even some data about when the user logged off the server as well. The only information I have ever found natively inside Windows that can help with this information gathering is the Windows Security Event Logs, but those are extremely messy to try and weed through to find what you are looking for. It's definitely not worth the hassle. So what's the solution here? The easiest way I have found to record login and logout information is to build and utilize some scripts that will run during every user logon and logoff. This is quite simple to do on each of your RDSH servers; let's give it a try together so you can have an idea of what I typically do...