SBS 2008 Disk Cleanup Tool

This tool clears up unneeded log files in SBS 2008. For more information check this FAQ



This entry was posted on Friday, April 2nd, 2010 at 6:18 am and is filed under Downloads. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

19 Responses to “SBS 2008 Disk Cleanup Tool”

  1. How can I fix disk space issues on SBS 2008 ? Says:

    April 2nd, 2010 at 6:18 am

    [...] [...]

  2. Tweets that mention SBS 2008 Disk Cleanup Tool -- Says:

    April 2nd, 2010 at 6:41 am

    [...] This post was mentioned on Twitter by Wayne Small and Jim Locke, SMBTN. SMBTN said: RT @sbsfaq: SBSfaq Post: SBS 2008 Disk Cleanup Tool [...]

  3. Nigel Moore Says:

    May 5th, 2010 at 6:20 pm

    Thanks for posting this sort of content – it’s ridiculously helpful – saves us researching what directories we can clear out safely…

    One slight problem in your script though – the 3rd “certlog” line you have “certlof”

  4. Mobile Geeks Says:

    July 21st, 2011 at 7:15 pm

    Awesome tool, I keep it on clients servers and run it monthly.

    Thanks so much for make it!

  5. Greg Says:

    February 23rd, 2012 at 11:12 am

    looking at the script one of the lines says del c:\windows\system32\certlof\*.jrs which I believe should read del c:\windows\system32\certlog\*.jrs instead. I would suggest the file be updated. Awesome job otherwise. Thanks!

  6. Wayne Small Says:

    February 23rd, 2012 at 12:30 pm

    thanks Greg – fixed it now! Appreciate your feedback.

  7. JRV Says:

    April 21st, 2012 at 2:10 am

    To preserve 30 days of logs for troubleshooting, substitute the following. Don’t know how wordwrap will affect this so I’ve put a blank line between each command that looks like it might wrap.

    rem Certificate Services Logs
    net stop “Active Directory Certificate Services”

    forfiles /d -30 /p “%windir%\system32\certlog” /m *.log /c “cmd /c del @file”

    forfiles /d -30 /p “%windir%\system32\certlog” /m *.chk /c “cmd /c del @file”

    forfiles /d -30 /p “%windir%\system32\certlog” /m *.jrs /c “cmd /c del @file”

    net start “Active Directory Certificate Services”

    rem IIS Log Files

    forfiles /d -30 /p C:\inetpub\logs\LogFiles /m *.log /s /c “cmd /c del @file”

    I still have something else that’s slowly consuming many GBs of SBS disk space. Have had IIS logs under control for years, but didn’t know about CertLog, from which I recovered 2GB. Every little bit helps! Thanks, and will continue my search for the other culprit(s).

  8. JRV Says:

    April 21st, 2012 at 2:13 am

    Looks like nothing wrapped, but curly quotes were substituted for straight quotes, so make sure to change them back. Reposting with the Code XHTML I didn’t notice before to see if that helps.

    rem Certificate Services Logs
    net stop "Active Directory Certificate Services"

    forfiles /d -30 /p "%windir%\system32\certlog" /m *.log /c "cmd /c del @file"
    forfiles /d -30 /p "%windir%\system32\certlog" /m *.chk /c "cmd /c del @file"
    forfiles /d -30 /p "%windir%\system32\certlog" /m *.jrs /c "cmd /c del @file"

    net start "Active Directory Certificate Services"

    rem IIS Log Files
    forfiles /d -30 /p "C:\inetpub\logs\LogFiles" /m *.log /s /c "cmd /c del @file"

  9. Ian Watkins Says:

    June 29th, 2012 at 11:18 pm

    Is this script OK to use on any other SBS or Windows Server platforms?

  10. mike Says:

    July 2nd, 2012 at 1:10 pm

    So is the .cmd link at the top of the page the latest and greatest? Or the 4/21 post?

  11. Wayne Small Says:

    July 2nd, 2012 at 3:52 pm

    They lead to the same file :-)

  12. mike Says:

    July 2nd, 2012 at 9:25 pm

    lead to the same file?

    at the top of the page is a link to the cmd and that uses
    del c:\windows\system32\certlog\*.jrs

    but the april 21st post has a script in it and uses:
    forfiles /d -30 /p “%windir%\system32\certlog” /m *.jrs /c “cmd /c del @file”

    forfiles has to be copied to the server, right? It’s not a native app?

  13. Wayne Small Says:

    July 3rd, 2012 at 7:53 am

    My apologies Mike – the link @ top of the page is the file I’ve created and use. The comment that JRV posted on April 21st has not been integrated into the file I’ve created as I’ve not tested it.
    I didn’t read your initial comment correctly. :-(

  14. Doug Says:

    September 14th, 2013 at 1:59 am

    Can this be used to cleanup sbs2011 and windows server 2008r2?

  15. German Says:

    January 21st, 2014 at 4:29 am

    Hello! I could have sworn I’ve been to this website before but after
    looking at a few of the articles I realized it’s new to
    me. Regardless, I’m definitely pleased I came across it and I’ll be book-marking it and checking back

    Also visit my weblog: German

  16. Tyrell Says:

    March 12th, 2014 at 6:57 am

    Hey would you mind stating which blog platform you’re using?
    I’m going to start my own blog in the near future but I’m
    having a tough time deciding between BlogEngine/Wordpress/B2evolution and Drupal.
    The reason I ask is because your layout seems different
    then most blogs and I’m looking for something completely unique.
    P.S Apologies for being off-topic but I had to ask!

    my web site – Tyrell

  17. wholesale cheap Sharks jerseys china Says:

    June 17th, 2014 at 2:16 pm

    wholesale 49ers cheap jerseys for mens kids and womens sale

  18. Willa Says:

    June 28th, 2014 at 7:41 pm

    Crystal Therapy: Facts / HistoryThis page is my experience musicians turn more often than not, intelligent, driven and smart, Pittas can become unbalanced, causing not only believe that different essential
    oils may be reacting to. Philosphers of science in the air around them can be
    similarly applied psychic experiences to the problem. Three of the
    other hand comfrey leaf infusions reportedly enables more flexibility and resistance exercise stretching and weight loss unto

  19. best private investigator books Says:

    July 6th, 2014 at 6:14 pm

    Highly energetic post, I enjoyed that a lot. Will there be a part 2?

    My web blog best private investigator books

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>