Is there a script already that empties the recycle bin and clears all the log files?
Please refer to these scripts
These are great thanks Jimmy. What about the system logs and error reporting logs and the like?
Kindly, refer the below script link.
Above script will perform the following tasks:
Tasks will be performed by the procedure:
Clears all Windows Temp Files
Clears all Internet Temp Files
Fixing Disk Errors (All Unremovable Disks)
Clear Printer Spool (Queuing Printer Jobs)
Clears DNS Cache
Clear Recycle Bin
Performs S.M.A.R.T. Check
And also refer the share script links on the previous comment box by @Jimmy