Dualcore DBA troubleshoots an issue:
It’s a classic backup job – run the backup using T-SQL and then upon success, purge the backup directory of backups that are older than a given number of days.
My backup job step backs up to a UNC path – \\192.168.2.174\Backups and then the PowerShell step will purge any backups older than 7 days.
Easy peasy…until it isn’t. Click through for the error and the solution.