How to do it...

Follow these steps to start recording information about user logins on your RDSH servers:

  1. Log into RDS1 and create a new batch file. We are going to utilize good old batch file scripts, but you could also create something with PowerShell to accomplish the same function. I find, however, that a single line of code inside a batch file does the trick quite well. I have created the following script on mine: C:\Reporting\Logon.bat
  2. Now right-click on that script, and choose Edit in order to open it up in Notepad.
  1. Input the following text:
      Echo %date%,%time%,%username%,%computername% >> 
      C:\Reporting\Logons.txt 
  1. Now you need ...

Get Windows Server 2016 Administration Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.