disk - Automating cleanmgr.exe silently using PowerShell -
i've been working on script supposed run cleanmgr.exe silently when disk c: less 1gb, it's working well, 1 thing couldn't achieve...
i want run cleanmgr.exe silently fully! don't wanna see disk cleanup gui not screen says done.
using sageset , sagerun made automated yes, still shows process.
here's code (i know has issues regarding few things, i'm focusing on silent execution here, thanks!):
if ($freespace -le $lowspace) { cleanmgr.exe /sagerun:10 defrag c: } else { echo "sorry!" pause }
if navigate c:\windows\system32\cleanmgr.exe /?
in command prompt see switches exe. unfortunately, looks there no silent switches utility.
powershell disk
No comments:
Post a Comment