Disk Cleanup question

Comments

5 comments

  • Colby Bouma

    I haven't tried this, but it looks promising: https://stackoverflow.com/a/35214197

    1
    Comment actions Permalink
  • Andrew Gresbach

    thanks for the link!  that does look pretty cool......i think that more or less is getting done what i already have though (setting the registry entries for the sageset and then running sagerun).  Like i said i am able to accomplish this fine through pdq but it just gives a success code right away after the sagerun command is completed instead of after the full cleanup is done so was just curious if there was any way to maybe have it continue to run until thats done but that may not be possible since that task spawns off different tasks.   either way it gets a simple way to clean stuff up! thanks for the help!

    1
    Comment actions Permalink
  • Colby Bouma

    but it just gives a success code right away after the sagerun command is completed instead of after the full cleanup is done so was just curious if there was any way to maybe have it continue to run until thats done

    I believe that's what this line does:

    Write-Host 'Waiting for CleanMgr and DismHost processes. Second wait neccesary as CleanMgr.exe spins off separate processes.'
    Get-Process -Name cleanmgr,dismhost -ErrorAction SilentlyContinue | Wait-Process
    1
    Comment actions Permalink
  • Andrew Gresbach

    oh ya good catch! i totally missed that part. thanks for the help here! i'll see if I can integrate that w/ this workflow.....I will say even w/out the confirmation and just running the base PS command like i originally mentioned it APPEARS to be totally silent on the user side so far which is not the case if you run it local so however PDQ is handling it is a nice benefit

    1
    Comment actions Permalink
  • Andrew Gresbach

    that link you sent works great!  i am testing again w/ a longer timeout period since this operation can take several hours but i think is just what we needed! thanks again

    1
    Comment actions Permalink

Please sign in to leave a comment.