= Lab 20 - PowerShell = == Introduction == This lab walks you through the process of developing a script that in turn creates a webpage displaying statistics about your servers that every administrator should check daily. As such this relies on Chapter 19 pp. 694-704. == Lab Goals == Create a {{{PowerShell}}} script that performs the checking and verification processes found in the "Daily Maintenance" section. Have it produce an html page available on your IIS machine under the name of {{{daily.html}}}. It should have results for the following: 1. Can users access data on file servers? 1. Check to see if your file shares are available. Don't know where they are? Look it up in your documentation. 1. Are the printer share(s) alive? What is their status? (e.g. online offline ...) 1. Who has logged on in the last 24 hours. 1. Can users access the internet? 1. Verify Backups ... ok, we don't do backups for virtual machines through normal backup procedures, so we won't do this this time. 1. Present Critical Events in event viewer. == Setup == Once you have created and tested the script, create a job that runs daily at 12:00 AM and put the output of your script in the root directory of your IIS server. I recommend that you do this using a share on your file server. I called mine www. Make sure Enterprise Admins have write permissions. Your script must be signed by a certificate that is trusted by the server. I found that this site was useful: https://www.sharepointdiary.com/2020/12/how-to-sign-powershell-script.html. == Show Me == 1. Run the script and show me the output. 1. Show that the script is setup to run daily at 12:00 AM 1. Show that the IIS server shows the output of the script.