+ Post New Thread
Results 1 to 1 of 1
Windows 7 Thread, Script / tools - automatic disk cleanup for Windows 7 clients in Technical; Another post for those of you looking for a particular handy tool: I have just managed to automate Windows 7 ...
  1. #1

    3s-gtech's Avatar
    Join Date
    Mar 2009
    Location
    Wales
    Posts
    3,098
    Thank Post
    161
    Thanked 654 Times in 587 Posts
    Rep Power
    169

    Script / tools - automatic disk cleanup for Windows 7 clients

    Another post for those of you looking for a particular handy tool:

    I have just managed to automate Windows 7 disk cleanup for clients, using this guide Breaking News! Reduce the size of the WinSxS Directory and Free up Disk Space with a New Update for Windows 7 SP1 Clients - Ask Premier Field Engineering (PFE) Platforms - Site Home - TechNet Blogs

    I now have two GPOs which I can apply to my clients, one runs the script:

    Code:
    Dism.exe /online /Cleanup-Image /StartComponentCleanup /SPSuperseded
    The next uses the settings from the technet guide.

    Run cleanmgr.exe /sageset:n on your Windows 7 PC (where n is you chosen set number, anything from 1 to 256)
    Tick the options you'd like to clean up on clients. Click OK.
    Go into the registry on your PC, go to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Curr entVersion\Explorer\VolumeCaches
    Export the reg keys (right click / Export) for the options you ticked. You don't need the keys for the ones key left unticked. Place them in a network share.
    Push them to your clients, e.g. with a startup script:

    Code:
    regedit /s \\\server\share\cleanup\dpf.reg
    regedit /s \\server\share\cleanup\icf.reg
    regedit /s \\server\share\cleanup\pi.reg
    regedit /s \\server\share\cleanup\rb.reg
    regedit /s \\server\share\cleanup\spc.reg
    regedit /s \\server\share\cleanup\tf.reg
    regedit /s \\server\share\cleanup\uc.reg
    regedit /s \\server\share\cleanup\udf.reg
    The names for each .reg key above were names that I chose, relating to each setting to export.

    Now run:

    cleanmgr.exe /sagerun:n (you can run this as a startup script, scheduled task etc).

    You'll want to restart the client PCs under some control, as it takes a while and kids love to turn the PCs off.

    Once it has restarted, check your disk space. It freed up 7GB for me, on a 60GB SSD that's pretty handy! Hope this helps someone. Remember, once you run this, your Windows updates etc will be locked in. Don't run it shortly after an update rollout, you may well regret it!

  2. Thanks to 3s-gtech from:

    Chuckster (19th June 2014)



SHARE:
+ Post New Thread

Similar Threads

  1. group policy for windows 7 clients
    By cheeseslice in forum Windows Server 2008 R2
    Replies: 5
    Last Post: 11th October 2013, 11:37 AM
  2. 15 Open source tools for Windows Admins
    By SYNACK in forum Windows
    Replies: 3
    Last Post: 20th September 2011, 10:42 AM
  3. Exchange 2007 tools - for windows 7 64 bit
    By mattx in forum Windows 7
    Replies: 4
    Last Post: 17th April 2011, 10:59 PM
  4. Replies: 0
    Last Post: 30th March 2010, 09:35 PM
  5. SSH Client for Windows Mobile 5
    By Joedetic in forum Windows
    Replies: 5
    Last Post: 23rd June 2006, 02:16 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •