Disable System Restore and Delete Restore Points from the Command Line (CLI)

System Restore is a feature in Microsoft Windows that allows the user to revert their computer’s state (including system files, installed applications, Windows Registry, and system settings) to that of a previous point in time, which can be used to recover from system issues or other problems.  In practice however, I can advise that this feature has never successfully yielded a positive result.  Therefor, I typically resolve to disable this feature altogether on my production machines, which increases space and performance.

The following script disables the System Restore service, sets a registry flag to reflect this and lastly eliminates all restore points saved on your system.  System Restore can also be disabled effectively via the Group Policy Editor gpedit.msc or the Active Directory equivalent in a domain environment.

1
2
3
Reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SystemRestore" /v DisableSR /t REG_DWORD /d 1 /f
sc config srservice start= disabled
vssadmin delete shadows /all

*Note the System Restore service exists in Windows versions prior to 10, the registry flag is sufficient to disable it.  I recommend disabling it entirely via the following setting:  Computer Configuration -> Administrative Templates -> System -> System Restore

System Restore Configuration location within the group policy editor (gpedit.msc)
System Restore Configuration location within the group policy editor (gpedit.msc)

 

System Restore Configuration in Group Policy
Lima

About the author

Lima is the visual nautical indicator for "stop instantly."

Leave a Reply