A logging interface for your PowerShell scripts, build with NLot
this CmdLet provides you a few functions to implement logging behavior in your PS-Scripts. Based on the Nlog C# library, you have a lot of possibilities how you want to implement your logging. Also it is easy and fast.
One of my personal goals was, to get a better understanding, how .NET-Objects and a scripting engine can interact together.
To all of those who are familar with PowerShell, just download the CmdLet and start logging. Otherwise just go to my blog and view the original article (here)
- Common logging functionality for all your PowerShell scripts
- Reusable code
- Easy to implement for the future
Use the TestScript.ps1
file to look how, logging functionality can be implemented into your script logic.
- Move all logic to a PS Module (.psm) => V2.0
- Easier logger initializtion
- Add more default layouts