Skip to content

Instantly share code, notes, and snippets.

@sionta
Last active September 5, 2021 10:08
Show Gist options
  • Save sionta/d9d0699b12aeb54d9289d02af2e1a118 to your computer and use it in GitHub Desktop.
Save sionta/d9d0699b12aeb54d9289d02af2e1a118 to your computer and use it in GitHub Desktop.
Delete restore point in windows
@echo off
:begins
set __SID_LOG=%~dp0list_restore_point
del /f "%__SID_LOG%" >nul 2>&1
vssadmin list shadows >>"%__SID_LOG%"
if exist "%__SID_LOG%" (
start notepad "%__SID_LOG%"
echo ====================================================================
echo.
echo Example Usage: Shadow Copy ID={3b7f66e2-d6c5-49fd-9bce-ff667f78dad3}
echo.
set /p ShadowID="Shadow Copy ID="
vssadmin Delete Shadows /Shadow=%ShadowID% /Quiet
echo. DONE!
pause
goto:begins
) else (
echo.
echo The file %__SID_LOG% is missing!
pause
goto:begins
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment