illusions Posted August 11, 2011 Posted August 11, 2011 Hi,I would like to turn off system restore on c drive since it is ON by default on windows 7.I have tried the following 2 vbs script found in the netscript 1 ------------------------------strComputer = "."Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\default")Set objItem = objWMIService.Get("SystemRestore")errResults = objItem.Disable("C:\")script 2 ------------------------------Dim SRP, eSRP Set SRP = GetObject("winmgmts:\\.\root\default:SystemRestore") eSRP = SRP.disable("C:\")However, when i click control panel -- system -- advance system settings -- system protection -- c drive is still show "ON"Please advice and thank you.
Yzöwl Posted August 11, 2011 Posted August 11, 2011 Powershell to disable System Restore on C: drive.disable-computerrestore "C:\"
illusions Posted August 12, 2011 Author Posted August 12, 2011 Powershell to disable System Restore on C: drive.disable-computerrestore "C:\"Hi owl, Thank for the reply ... I tried your suggestion and run the script but when i check system protection the c drive is still "ON".
CoffeeFiend Posted August 12, 2011 Posted August 12, 2011 I tried your suggestion and run the script but when i check system protection the c drive is still "ON".Did you run powershell elevated? You need to do that to change these kinds of settings on your computer. Otherwise, did you get an error message of any kind? Because that's a standard, built-in cmdlet to do it so I'd be surprised if it didn't work.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now