none
Turn OFF System Protection RRS feed

  • Question

  • MDT seem to turn System protection everytime it finish a TS.

    We do NOT use system protection and we need to turn it off.
    I wrote a PowerShell script to disable it but MDT re-enable it at the end.

    How do I tell MDT not to enable/turn on system protection?

    Thank you,


    Ray

    Wednesday, May 7, 2014 4:03 PM

All replies

  • Wednesday, May 7, 2014 4:43 PM
  • It will disable SR durning "Install OS" but it re-enable afterward...

    I confirmed it by "pausing" the TS and see the SR disabled durning TS....

    MDT seems to re-enable in the very very end of TS


    Ray


    Wednesday, May 7, 2014 5:24 PM
  • I think i found it, it is in the LTICleanup.wsf

    There is a function for it:

    Function EnableSystemRestore (sVSSMaxSize)
    	
    		Dim iRetVal, oSRP
    
    		' Enable system restore
    		On Error Resume Next
    		Set oSRP = GetObject("winmgmts:\\.\root\default:SystemRestore")
    		iRetVal = oSRP.Enable(oEnv("Systemdrive") & "\")
    
    		' Configure Shadow storage size
    		oShell.Run "cmd.exe /c vssadmin resize shadowstorage /For=" & oEnv("Systemdrive") & " /On=" & oEnv("Systemdrive") & " /MaxSize=" & sVSSMaxSize, 0, False
    		On Error Goto 0
    		EnableSystemRestore = iRetVal	
    		
    	End Function

    The function is called in the script (line 520 but yours could be different) like this:

    EnableSystemRestore sMaxSize

    You could try to comment that line 


    • Edited by Thomas Vitoz Wednesday, May 7, 2014 6:09 PM
    • Proposed as answer by Thomas Vitoz Tuesday, May 27, 2014 10:30 AM
    Wednesday, May 7, 2014 6:05 PM