DiskCleanup - Clean up Windows Upgrade Files

As I saw more potential for this method of utilizing the Disk Cleanup tool, I decided to write a proper module that does simplifies the job creation process beyond just cleaning up Previous Windows Installation / Upgrade files.

DiskCleanup.psm1
 
 
 
 
 
(0)
890 times
Add to favorites
Storage
7/28/2016
E-mail Twitter del.icio.us Digg Facebook
Sign in to ask a question


  • Force Parameter
    2 Posts | Last post July 28, 2016
    • Hello Jaap,
      
      thank for this great ps-module!
      
      I have two ideas for the cmd-let "Remove-WindowsUpgradeFiles":
      - Can you integrate a Parameter thats not display the Confirm question (Example -Force)?
      - Can you integrate a Parameter thats not display the warning-window by removing the "Previous Installations" (do you want to continue?)?
      
      Greets
      
      Johannes Sebald
    • Hello Johannes,
      
      I have added in the -Force parameter for Remove-WindowsUpgradeFiles. You could already force it by specifying -Confirm:$false, but I see the merit for a -Force parameter as well so I added it in there.
      
      Unfortunately I do not know of any way to override the warning windows generated by the disk cleanup applications. As far as I am aware there is no way to override this.
      
      
      Regards,
      
      Jaap Brasser