mirror of
https://github.com/amidaware/community-scripts.git
synced 2026-04-27 23:15:49 +03:00
[PR #189] [MERGED] Remove cleanmgr and PromptForScan functions #195
Labels
No labels
enhancement
good first issue
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/community-scripts#195
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/amidaware/community-scripts/pull/189
Author: @joeldeteves
Created: 10/25/2023
Status: ✅ Merged
Merged: 2/23/2024
Merged by: @silversword411
Base:
main← Head:fix_disk_cleanup_script📝 Commits (1)
dd440ecRemove cleanmgr and PromptForScan functions📊 Changes
1 file changed (+1 additions, -40 deletions)
View changed files
📝
scripts/Win_Start_Cleanup.ps1(+1 -40)📄 Description
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 issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.