Windows by Patrik

Repairing DSC Failures and Identifying Configuration Issues

If cleanup does not resolve the issue, the next step is to investigate DSC itself.

First restart the relevant services:

Restart-Service WinRM -Force
Restart-Service WmiApSrv -Force -ErrorAction SilentlyContinue

Next, review the DSC operational log for detailed error messages:

Get-WinEvent -LogName "Microsoft-Windows-DSC/Operational" -MaxEvents 20 |
    Select-Object TimeCreated, Id, LevelDisplayName, Message |
    Format-List

The operational log often reveals the resource responsible for the failure.

To test the current DSC configuration, manually start a configuration run:

Start-DscConfiguration -UseExisting -Wait -Verbose

In this scenario, DSC reported a failure in the MSFT_AccountPolicy resource while attempting to update the Minimum_Password_Length setting.

This indicates that:

  • DSC is still able to load the current configuration.
  • The active configuration contains a failing resource.
  • The failure may be caused by a conflict with local or domain password policies.
  • Corrupted DSC status information may be generated when the configuration repeatedly fails.

At this stage, review the DSC configuration source and verify whether password policy settings should still be managed by DSC. Correcting or removing the failing configuration and then applying a new configuration is typically the final step in restoring a healthy DSC environment.

Repair
DSC
Troubleshooting
Events
PowerShell

Comments