Problem:
A lot of older workstations on our networks are running out of hard disk space and I am looking for ways to stream-line the process of cleaning up some space. I understand I can use Disk Clean-up to do this but that requires logging on and running it manually, which can take some time for the amount of workstations we have in our environment.
Solutions I have tried:
I have already setup GPOs for Storage Sense to remove temporary files, downloads etc. but one of the larger folders is the Windows.old directory.
I found the following script using disk clean-up:
cleanmgr.exe /SAGERUN:0
But this requires me run it as the user itself and we do not have admin permissions for standard users. It also still requires user intervention to choose the folders that are deleted with disk-clean up.
Solution I am seeking:
I am looking for a script I can run via PDQ Deploy to clean-up the Windows.old directories on workstations, something I can run without any user input.