This PR removes the cleanmgr.exe and PromptForScan functions from the script.
Reasons:
PromptForScan -> obviously this will never complete in an RMM environment like Tactical. Secondly, we shouldn't remove ISOs anyways without the user's permission (just a bad idea like a sysadmin accidentally running on a server and deleting all IT ISOs).
cleanmgr.exe -> this is hit and miss at all times - on half the systems it runs on, it hangs due to a hidden window in the background. I've tested all variants and it's not reliable. Secondly, cleanmgr.exe is technically deprecated and is being slowly phased out by StorageSense. Third, everything else in the script does exactly what cleanmgr does - so the functionality is duplicated.
I've tested these changes repeatedly on different agents and it works correctly now.
On some systems, it frees up a couple of GB - that's consistent with cleanmgr so it does appears that without cleanmgr the script works as intended (including the SoftwareDistribution folder and temp files).
This PR removes the cleanmgr.exe and PromptForScan functions from the script.
Reasons:
PromptForScan -> obviously this will never complete in an RMM environment like Tactical. Secondly, we shouldn't remove ISOs anyways without the user's permission (just a bad idea like a sysadmin accidentally running on a server and deleting all IT ISOs).
cleanmgr.exe -> this is hit and miss at all times - on half the systems it runs on, it hangs due to a hidden window in the background. I've tested all variants and it's not reliable. Secondly, cleanmgr.exe is technically deprecated and is being slowly phased out by StorageSense. Third, everything else in the script does exactly what cleanmgr does - so the functionality is duplicated.
I've tested these changes repeatedly on different agents and it works correctly now.
On some systems, it frees up a couple of GB - that's consistent with cleanmgr so it does appears that without cleanmgr the script works as intended (including the SoftwareDistribution folder and temp files).