Remove files based on age in days and email success message in Powershell

I have to cleanup a server share daily.  The following powershell script will remove old files and email a note to me telling me it ran.

I need to get it to mail on failure, but I’ve not gotten that far.

Comments Closed.