Skip to main content

Purge Old Windows Update Folders

Summary​

This Script deletes old Windows Update backup folders (SoftwareDistribution.bak* and Catroot2.bak*) that haven’t been modified in a specified number of days.

Default: 30 days

Sample Run​

Sample Run

Global Parameters​

NameDefaultDescription
AgeInDays30Specifies the minimum age (in days) of backup folders; only folders last modified earlier than this value will be deleted.

Output​

  • Script Logs

Changelog​

2026-01-12​

  • Initial version of the document