none
Scripting Windows 10 storage sens

    Question

  • Hi Team!

    I have searching a way to automate disk cleanup process on Windows 10 1803...

    Here is a nice way in bach file using cleanmgr.exe:
    https://www.petri.com/free-disk-space-in-windows-10-automating-disk-cleanup

    But in this post Microsoft says thar this tools will be deprecated:
    https://blogs.technet.microsoft.com/filecab/2018/08/30/9205/

    So, I would like to know if there is any way to script the storage sens (powershell preferred) and then I could trigger it when I want and make logs, etc...

    Many thanks!

    Victor

    Monday, December 3, 2018 12:25 PM

Answers

All replies

  • This is not a scripting issue.

    To find out what new utility Microsoft will use you will either have to wait for the new Microsoft utility or you will need to contact MS for help.

    Here is a script that can set SENS parameters:

    https://github.com/jaapbrasser/SharedScripts/blob/master/Set-StorageSense/Set-StorageSense.ps1

    "Storage Sense" is managed by the OS so there is no way to force it to run.


    \_(ツ)_/

    • Marked as answer by Victor M$ Wednesday, December 5, 2018 11:51 AM
    Monday, December 3, 2018 2:20 PM
  • Hi jrv!

    Thats was I thought... that's why posted here as last resource ;) I am currently setting storage sens by GPP, adding exactly the same values that the  link script does. But it doesn't work as I want.

    Is funny... I runned the storage sens and seems to be the same .exe that Cleanup disk tool :S

    Any way... I will "powershelling" the cleanmgr.exe until the new fantastic tool shows up...

    Many thanks for the info!

    Tuesday, December 4, 2018 9:07 AM