Creating your own Powershell CmdLet for SharePoint

What are we trying to accomplish?

I was asked to list all Areas and Category within the Diagnostic Logging at a customer request.

Because I was using PowerShell to retrieve all other settings I made the choice to create a custom CmdLet because there isn’t any available by default to retrieve all Areas and Category. Below you’ll find the source code of my CmdLet, feel free to use it. I’ve also added some explanation of how to add the CmdLet and what the CmdLet can do for you.