This PowerShell script generates a CSV report of all files in a specified directory (including subdirectories) that were created or last modified over 6 years ago. The report is saved to a specified location.
$rootDirectory
: Defines the root directory to search for files.$outputCsv
: Defines the output CSV file path where the report will be saved.