improve summary display

This commit is contained in:
2026-10-23 11:33:03 -04:00
parent c5ef81dfca
commit 08dbb3cdd5
4 changed files with 78 additions and 41 deletions
+18 -11
View File
@@ -32,7 +32,7 @@ Run once with `CleanupReportOnly=true`, then set it to `false` to apply. Report
mode assesses **all categories regardless of their enablement**, using the current
retention settings. It leaves the enablement variables unchanged. The compact
report starts with the unique enabled savings and additional disabled savings,
followed by three diagnostic lines, then every category once in three sections:
followed by a component-store note, then every category once in three sections:
- **Enabled:** eligible for cleanup on an apply run, subject to the reported conditions.
- **Disabled:** potential savings only; these categories will not run during apply
@@ -48,8 +48,8 @@ File categories report their independent eligible file counts and logical bytes.
These category estimates can overlap (for example, a duplicate downloaded EXE).
The enabled total counts each file path once. The disabled total shows additional
unique file bytes beyond those already counted in enabled categories. Native
operations such as Disk Cleanup, VSS, Search compaction, Delivery Optimization,
component cleanup, and disabling hibernation show `-` and **not estimated**, not
operations such as Disk Cleanup, Search compaction, Delivery Optimization,
and component cleanup show `-` and **not estimated**, not
zero. Disk Cleanup shows its preset (or Custom) and selected handler count.
`None` places Disk Cleanup in the Disabled section. Servers always place it in
the Blocked section, regardless of the preset.
@@ -60,17 +60,23 @@ excluded from the totals, and file sizes do not guarantee physical space savings
The report-only diagnostics run regardless of the corresponding cleanup flags:
- **Hibernation:** current system-drive `hiberfil.sys` size in GiB, or explicitly
"not present". An inspection failure is unavailable, not an absent file.
- **ShadowStorage:** used and allocated GiB for the system volume's shadow-storage
association, including the drive where that data resides. Storage on another
drive is labeled accordingly; it does not represent space occupied on C:.
No registered association and failed/unsupported CIM queries are distinguished.
- **DisableHibernation:** the category's MiB column shows the current system-drive
`hiberfil.sys` size, or `0.00` when absent. Its note identifies this as file size.
- **ShadowCopies:** the category's MiB column shows used shadow storage for the
system volume, or `0.00` when no storage association exists. Its note identifies
VSS usage and the drive where the data resides. Storage on another drive is
labeled accordingly; it does not represent space occupied on C:. Allocation
details remain available in verbose output.
- **ComponentStore:** a short note that removing superseded updates may free
substantial space, or little/none. The component store is not analyzed, and no
Yes/No recommendation or package count is calculated. The note appears even if
`CleanupComponentStore=false` or `CleanupDiskCleanupItems=None`.
There are no separate Hibernation or ShadowStorage diagnostic lines. The two
native rows keep `-` in the Files column. Failed/unsupported inspections show `-`
for MiB and **unavailable**, never zero. Structured results expose these usage
measurements as `UsageBytes`, separately from `CandidateBytes`.
These are **current usage and potential, not extra reclaimable bytes**;
they are excluded from both savings totals. VSS data may be shared between
snapshots, and the script retains the newest snapshot. Hibernation/VSS diagnostics
@@ -260,8 +266,9 @@ Output tests cover the duplicate-object regression, a 22-category preview under
4 KiB including diagnostics, separate enabled/disabled sections, and preservation
of diagnostic notes. Regression checks ensure DISM analysis is absent and report
diagnostics launch no native programs.
Hibernation/VSS tests cover absence, access failures, cross-drive storage, server
exclusions, and usage staying out of savings totals.
Hibernation/VSS tests cover usage in category MiB columns, zero for absence,
unknown sizes after access failures, cross-drive storage, server exclusions, no
duplicate diagnostic lines, and usage staying out of savings totals.
References: [OS ProductType](https://learn.microsoft.com/en-us/windows/win32/cimwin32prov/win32-operatingsystem),
[Disk Cleanup](https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/cleanmgr),