PowerShell Log File Cleaner App

PowerShell Log File Cleaner App

v1
Model: Claude
Difficulty: Intermediate
Likes: 1
Copies: 0
automationcleanuplogsPowerShellWindows

Prompt

Draft a PowerShell script that finds and deletes all .log files older than [X] days in [folder], outputs a summary to the screen, and logs to a file.

Why It Works

Saves disk space, automates routine cleanup, and documents what was deleted.

Example Output

Folder: C:Logs, Days: 30. Script: Get-ChildItem, Remove-Item, Write-Output, log to C:CleanupReport.txt.

Suggest an improvement

Log in to submit omissions or improvements.