Windows Server

PS Script For Scanning And Removing Files With Extension And Retention

– Download script at github link:

– Structure  for running this script:

clear-files-retention.ps1 <path for scanning file> <retention days for keep file> <extension of files nedd to check>

– When running this script need passing enought 3 arguments if missing any argument script will exising without actions 

– If passing all requriment argument, in next step script will list again all value for checking and prompt Yes/No confirm to continue

– Choose Y and script will scanning and removing files with condiontion passing to arguments. List of file removed will be logged in file:


error: Content is protected !!