Using a PowerShell Script to delete old files for SQL Server

Posted on SQL Server Central See other posts from SQL Server Central
Published on Mon, 02 Jul 2012 06:00:00 UT Indexed on 2012/07/02 9:20 UTC
Read the original article Hit count: 212

Filed under:

Many clients are using custom stored procedures or third party tools to backup databases in production environments instead of using database maintenance plans. One of the things that you need to do is to maintain the number of backup files that exist on disk, so you don't run out of disk space. There are several techniques for deleting old files, but in this tip I show how this can be done using PowerShell.

© SQL Server Central or respective owner