Skip to content

maxwroc/Remove-RedundantLogFiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

Remove-RedundantLogFiles

Script for removing old log files

Features

  • Shows number of files found
  • Lists old files from given directory
  • Adds scheduled task in the system to run on daily basis

image

Examples

Finds files 30 days old in given directory and asks what to do

.\Remove-RedundantLogFiles.ps1 -FolderPath C:\inetpub\logs\LogFiles

Finds files 5 days old in given directory and asks what to do

.\Remove-RedundantLogFiles.ps1 -FolderPath C:\inetpub\logs\LogFiles -DaysOld 5

Removes 10 day old files from given directory without any prompt and logs number of deleted files

.\Remove-RedundantLogFiles.ps1 -FolderPath C:\inetpub\logs\LogFiles -DaysOld 10 -RemoveFiles

About

Script for removing old log files

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published