I’m programmatically trying to enable/disable System Restore in Windows 7. I have enable system restore working “Enable-ComputerRestore”, but disable is giving me issues.
Disable-ComputerRestore -drive "C:\"
doesn’t set my C: drive to “Turn off system protection”. It sets it to “Only restore previous versions of files” instead. Anyone have a clue as to why this could be happening?
I’m solving this using WMI and the following C# code adapted from here.