The default logging in PowerShell Desired State Configuration is sometimes a bit limited. You can use the Verbose output to get more information about a Push deployment, but what about reboots or unattended runs (e.g. Consistency Checks or Pull mode deployments)? In those instances the Verbose output isn't visible.
Last year I created a blog post on the DSC Community blog about DSC logging and the DSC Log Parser script I created. This article describes the methods to view the verbose logging output, which is also written to disk and is very useful for troubleshooting issues. But wait, there is more!
DSC also creates an event log in which events are logged. This log can be found under "Applications and Services Logs > Microsoft > Windows > Desired State Configuration > Operational". This log can contain some useful errors, but often is not sufficient to troubleshoot an issue.
Ok, now what?
Custom SharePointDsc event log
That is why we have implemented a custom event log functionality in SharePointDsc. The log can be found at "Applications and Services Logs > SPDsc"
Since v4.2 this log contains entries for each resource that is not in the desired state (Event ID 1). With the next release (v4.4), we are also going to add entries if an exception is thrown in the code (Event ID 100).
Using this log, troubleshooting incompliance is made easier. It also enables you to use monitoring tooling (like System Center Operations Manager) to create alerts on configuration issues in your SharePoint environment.
Future plans
The plan is to extend this logging functionality with more information going forward, like non terminal errors.
If you have any ideas on what information you would like to have logged, let us know in the comments.
Important: This functionality is SharePointDsc specific and does not work for other resources, with the exception of Microsoft365Dsc.