The SysAdmin PowerShell Module consists of a diverse set of functions, but there is one set of functions that is leveraged in every other function…Logging! The logging functions provide visual feedback to the user about the progress of a script. It can also provide valuable debugging information when a script goes sideways.
The logging functions consist of a core function ‘New-Log’. The function takes two parameters: (1) the log text, and (2) the type of log. The second parameter is not required. The remaining logging functions in the module call ‘New-Log’ with the second parameter. The functions are shown below: