Trying to delete old System restore points in Windows 7 before image capture. RRS feed

  • Question

  • Hi all,

    I'd like to delete all the system restore points in Windows 7 before I capture the reference image.  I'd like to make the reference image as lean as I can before i capture it.  I found this command that should do it:

    vssadmin delete shadows /for=c: /all /quiet

    I've tried this command line on the computer and it appears to work.  Note:  I'm doing this logged in as the local administrator and I don't need to start an elevated command prompt.

    I am trying to figure out a way to run this command in MDT 2013.  I've tried to use the command line step:

    cmd.exe /c vssadmin delete shadows /for=c: /all /quiet

    I've also tried to make a batch file (in the "DeploymentShare\Scripts" folder) with that command in it, and run the batch file in command line:

    cmd.exe /c %SCRIPTROOT%\deleteRestore.bat

    I continue to have the task sequence fail reporting these errors:

    If anyone can help me troubleshoot or complete my goal in another way that would be helpful.  I'm not familiar with scripting so please provide detail if your solution includes that.

    Wednesday, April 9, 2014 7:30 PM


All replies