Enable and disable ConfigMgr client debug logging in a jiffy using Powershell and Run Script

Introduction

Debug/verbose logging! A topic which every ConfigMgr admin will have to get familiar with sooner or later. Lazy as one can be, I usually Google the requirements every time I need it, so I figured it was time to make something more permanent and more clever.

There are a billion blog posts on the topic already, but as far as my Google skills serves me, no one is using the run script feature and no one is providing complete scripts for the purpose. So this is me doing that. A complete solution for your copy/paste pleasure 🙂

Powershell

I initially did a complete Powershell script made to be run outside of ConfigMgr, which accepts parameters to both enable and disable debug/verbose logging. I’m making this available for download here if interested.

>> https://gallery.technet.microsoft.com/Enable-Disable-Debug-743bdcae <<

A quick snip of when run manually below:

Then I realized that doing this with the Run Script feature is much more appealing, so I broke the script into two pieces:

Enable Debug/Verbose Logging

Disable Debug/Verbose Logging

Run Script

Now, put above two scripts to use with the run script feature in ConfigMgr by creating and approving them in the console as shown below.

Locate the device where you want to enable/disable debug logging and select to run script

The scripts are made to give you either SUCESS 0 or FAILURE 1 as output when run:

ENJOY 🙂

1 thought on “Enable and disable ConfigMgr client debug logging in a jiffy using Powershell and Run Script”

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.