5 Replies Latest reply on Nov 16, 2017 12:56 PM by LucD

    Deleting Old Reports

    pamiller21 Enthusiast

      Alright so this isn't related to vmware or powercli, but I have all my scripts output to a temp folder then ftp them to a webserver.  I then have a script run daily to delete any temp file that is older than 60 Days, well just realized sometime ago the script has been failing.  This is the script:

       

      Get-ChildItem "C:\util\scripts\Temp" -Recurse | where {$_.LastWriteTime -lt (Get-Date).AddDays(-60)} | Remove-Item

       

      And I have a scheduled task run daily with the highest privileges and a local admin creds. I am now getting a 0x103 error saying its taking to long before I have the task scheduler term the attempt.

       

      Any ideas?