Windows by Patrik

Measuring the Size and Growth of the ConfigurationStatus Folder

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.

DSC
Storage
Analysis
PowerShell
Windows

Comments