Troubleshooting a Large DSC ConfigurationStatus Folder and Repairing Broken DSC State
A surprisingly large C:\Windows\System32\Configuration folder can consume tens of gigabytes on a Windows Server. One common cause is the DSC (Desired State Configuration) status history stored in the ConfigurationStatus folder.
In this case, the folder contained more than 30,000 status files and consumed over 40 GB of disk space. Although the Local Configuration Manager (LCM) was configured to retain status information for only a limited number of days, old files were still present, indicating that the cleanup process was no longer working correctly.
A structured approach helps determine whether the problem is caused by excessive status files, corrupted DSC state information, or a failing configuration.
The process consists of three main steps:
- Analyze the current DSC configuration and status history.
- Clean up old status files that are no longer needed.
- Repair DSC and identify any configuration resources that are failing.
Following these steps helps reclaim disk space, restore DSC functionality, and identify configuration issues that may prevent DSC from running successfully.
A large ConfigurationStatus folder is often the first sign that DSC status retention is no longer working correctly. Before making any changes, determine how much space is being consumed and whether old status files are accumulating.
First identify the operating system version:
Get-ComputerInfo | Select-Object WindowsProductName, WindowsVersion, OsBuildNumber
This helps determine whether known DSC issues may apply to the server version.
Count the number of status files:
(Get-ChildItem "C:\Windows\System32\Configuration\ConfigurationStatus").Count
A very high number may indicate that status files are no longer being cleaned up automatically.
Calculate the total size:
Get-ChildItem "C:\Windows\System32\Configuration\ConfigurationStatus" -File |
Measure-Object Length -Sum
Review the oldest files:
Get-ChildItem "C:\Windows\System32\Configuration\ConfigurationStatus" |
Sort-Object LastWriteTime |
Select-Object -First 10
Review the newest files:
Get-ChildItem "C:\Windows\System32\Configuration\ConfigurationStatus" |
Sort-Object LastWriteTime -Descending |
Select-Object -First 10
Comparing old and new files helps determine whether retention is working and whether DSC is still actively generating status data.
Comments