Manage System Restore from the command line

Martin Brinkmann
Oct 5, 2012
Updated • Oct 5, 2012
Tutorials, Windows, Windows tips
|
3

System Restore is a handy backup feature that Microsoft has integrated into newer versions of the Windows operating system. The feature basically creates copies of files before system changes happen and on user command. This happens for instance when you install a new driver or update Windows. The default size depends on the size of the hard drive but is usually well in the Gigabyte range.

A quick test on my Windows 7 Pro system with a 128 Gigabyte SSD main drive revealed that Shadow Copies were using 5,86 Gigabytes of storage. The same check on a Windows 8 system and a 180 Gigabyte SSD revealed a slightly lower storage use of 3.09 Gigabytes.

You can manage the size of system restore on individual drives, or turn it off completely, via Control Panel > System and Security > System > Advanced system settings > System Protection. A click on configure in the menu opens the system restore preferences for the selected drive. Here you can reduce or increase the size available to the feature, or turn it off completely for the drive.

What you can't do is delete individual System Restore points or display the storage use of all connected hard drives at once. You can use a program like System Restore Manager to delete individual points to free up room on the hard drive.

If you can't or do not want to use a third party software, you can instead use the Windows command line and the vssadmin command to deal with these issues.

Open an elevated command prompt.

  • Windows 7: click on the start menu, then All Programs > Accessories. Right-click Command Prompt and select Run as Administrator from the context menu.
  • Windows 8: Tap on the Windows-key to open the startpage. Enter cmd here, right-click on the Command Prompt result, and select Run as Administrator from the bottom toolbar.

Commands

  • vssadmin list shadowstorage - This command lists all connected hard drives and their used, allocated and maximum shadow copy storage space.

vssadmin list shadowstorage

  • vssadmin list shadows - This command lists all existing shadow copies on the system
  • vssadmin delete shadows /for=c: /oldest - This command deletes the oldest shadow copy on drive C
  • vssadmin delete shadows /for=d: /all - This command deletes all existing shadow copies on drive D
  • vssadmin delete shadows /for=c: /shadow=ID - Deletes the selected shadow copy. The IDs are listed when you use the list shadows command.
  • vssadmin resize shadowstorage /for=c: /maxsize=2GB - Sets the shadow storage for drive C to 2 Gigabyte. May delete existing restore points starting with the oldest if space is not sufficient to store all System Restore points

Windows Server admins furthermore can use the vssadmin add shadowstorage command to use another volume for storage of the system restore points.

Advertisement

Previous Post: «
Next Post: «

Comments

  1. ElCondor said on February 3, 2019 at 7:46 am
    Reply

    Lee Whittington Great Program but Bit Defender thinks its Malicious and There is CONTACT YOU On the Thing to Tell You Anything about it, if there is i cant FIND IT.

  2. selno said on May 16, 2013 at 2:35 pm
    Reply

    manage system restore from command promt line (using these cmd command):

    1) Turn Off (delete all system restore points) :
    sc config srservice start= disabled
    Reg add “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SystemRestore” /v DisableSR /t REG_DWORD /d 1 /f
    net stop srservice

    2) Turn On
    sc config srservice start= Auto
    net start srservice
    Reg add “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SystemRestore” /v DisableSR /t REG_DWORD /d 0 /f

  3. JKurt said on October 6, 2012 at 3:52 pm
    Reply

    I will have to learn how this command works… Personally I think command line is better than the GUI counterpart.
    Thanks!

Leave a Reply

Check the box to consent to your data being stored in line with the guidelines set out in our privacy policy

We love comments and welcome thoughtful and civilized discussion. Rudeness and personal attacks will not be tolerated. Please stay on-topic.
Please note that your comment may not appear immediately after you post it.