Enabe System Restore and adjust Disc Space Usage to 5% via registry or command line

0

Exactly like the screenshot but via Registry or command line instead of GUI.

enter image description here

Clacers

Posted 2017-07-27T14:54:54.220

Reputation: 253

The picture you posted is from Windows 10. Can you clarify what you mean by "but on Windows 10"? – ifconfig – 2017-07-27T14:57:35.057

Sorry for the confusion, I edited the question. – Clacers – 2017-07-27T15:01:59.300

Check out https://www.windows-commandline.com/enable-disable-system-restore-service/ for the enabling portion at least. Give it a whirl!

– Pimp Juice IT – 2017-07-28T00:49:33.580

Answers

0

To enable system protection for a drive:

powershell -command "Enable-ComputerRestore -Drive C:"

To set maximal allowed disk space:

vssadmin resize shadowstorage /for=C: /on=C: /maxsize=10GB

Tip: You can also use /maxsize=5% for percentual sizes and /maxsize=UNBOUNDED for unlimited size

Both commands need to be executed as administrator.

testeaxeax

Posted 2017-07-27T14:54:54.220

Reputation: 1 315

Thank you! Almost perfect! But I wish /maxsize=5% would work... – Clacers – 2017-07-30T07:56:45.970

@Yethat Actually /maxsize=5% does work. – testeaxeax – 2017-07-30T13:15:19.147

You're right. It didn't work with % because I executed it via batch. Why? – Clacers – 2017-07-30T16:36:44.247

1@Yethat In batch scripts you need to escape the % sign with %%, but not directly in cmd (I know this behavior is quite confusing...). – testeaxeax – 2017-07-30T18:29:32.090