[PR #189] [MERGED] Remove cleanmgr and PromptForScan functions #500

Closed
opened 2026-03-14 01:25:13 +03:00 by kerem · 0 comments
Owner

📋 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: mainHead: fix_disk_cleanup_script


📝 Commits (1)

  • dd440ec Remove 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:

  1. 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).

  2. 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.

## 📋 Pull Request Information **Original PR:** https://github.com/amidaware/community-scripts/pull/189 **Author:** [@joeldeteves](https://github.com/joeldeteves) **Created:** 10/25/2023 **Status:** ✅ Merged **Merged:** 2/23/2024 **Merged by:** [@silversword411](https://github.com/silversword411) **Base:** `main` ← **Head:** `fix_disk_cleanup_script` --- ### 📝 Commits (1) - [`dd440ec`](https://github.com/amidaware/community-scripts/commit/dd440eca3a31748a029179dd888ed3017a9a0acb) Remove cleanmgr and PromptForScan functions ### 📊 Changes **1 file changed** (+1 additions, -40 deletions) <details> <summary>View changed files</summary> 📝 `scripts/Win_Start_Cleanup.ps1` (+1 -40) </details> ### 📄 Description This PR removes the cleanmgr.exe and PromptForScan functions from the script. Reasons: 1. 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). 2. 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). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-14 01:25:13 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/community-scripts#500
No description provided.