#ps delete files -x days

Get-ChildItem -path “C:\TEMP” -Recurse |where-object {$_.CreationTime -lt (get-date).AddDays(-5)} |Remove-Item