Press "Enter" to skip to content

Author: Roger Delph

PowerShell Logging Module

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:

Systems Admin PowerShell Module

Over the past year, I have passed from PowerShell n00b to being able to script/code anything that has been thrown at me. One of the main reasons I have been able to progress this far with my PowerShell abilities are all the great blogs and resources on the internet. I hope over time, that this blog may be a resource for those starting with PowerShell and those who want to learn more.

While I’ve been learning PowerShell, I have been compiling a PowerShell Module for Sys Admins. This module consists of a core library that handles reporting, connecting to remote servers, etc. In addition, it contains scripts for adding everything from DNS records creating, pulling system configuration information and a lot in between. As I go through the existing module, I’ve decided to rewrite and update the module. As I go through this process, I will share the various cmdlets under the PSModule category.

If you have any suggestions, please let me know!