Course Overview

This course is the final part of the Build Your Own Tools series. If you are already familiar with the basics of PowerShell (you can use the pipeline, know about the objects, proficient in flow control elements of the PowerShell programming language and you have already written basic functions and scripts) then this course is for you to step up to the next level. In this course, you can learn through a lot of demos how to write enterprise-grade logging functions in a module that creates new log files and purge old ones automatically, does proper logging that makes troubleshooting easy, indicates and log progress, is capable of logging object-related data, log information about the parameter use. After the course completion, you will be known as a PowerShell developer who writes elegant and easy-to-use code with informative logging.

What You Will Learn

  • How to write a logging function for your functions and scripts
  • How to create a module
  • How to use logs to troubleshoot your functions and scripts
  • How to access information about the execution of a script from a function defined in a module
  • We’ll discuss the different ways of executing and terminating a script

Program Curriculum

  • Overview of Logging, Define Our Expectations
  • Create an Initialization Function for Logging that Handles Log Files Automatically – Part 1
  • Create an Initialization Function for Logging that Handles Log Files Automatically – Part 2
  • Create an Initialization Function for Logging that Handles Log Files Automatically – Part 3
  • Create Functions to Output Formatted Information
  • Create a Function that Adds Log Entries to the Log File – Part 1
  • Create a Function that Adds Log Entries to the Log File – Part 2
  • $7 Million Cybersecurity Scholarship by EC-Council
  • Chapter 1 Lab
  • Chapter 1 Quiz

  • Executing and Exiting a Script, Extend Logging with Exiting Entry Types – Part 1
  • Executing and Exiting a Script, Extend Logging with Exiting Entry Types – Part 2
  • Leverage $Error for Logging Unhandled Errors
  • Review the Different Error Types and the Use of $Error in Try/Catch Blocks
  • Chapter 2 Lab