Skip to content

Instantly share code, notes, and snippets.

@sheepla
Last active December 30, 2022 02:59
Show Gist options
  • Select an option

  • Save sheepla/0245e3e0ed84d803262341b7c461f726 to your computer and use it in GitHub Desktop.

Select an option

Save sheepla/0245e3e0ed84d803262341b7c461f726 to your computer and use it in GitHub Desktop.
Manage system restore point with PowerShell

🛣️ Manage system restore point with PowerShell

By creating a restore point, you can restore the system files, registry, etc. to the state when the restore point was created.

Normally, to create a system restore point in the GUI, open System Properties (sysdm.cpl) and open the System Protection tab.

Create a system restore point

This time, use PowerShell to manage system restore points. Start Windows PowerShell with administrator privileges.

Enable system protecting

Before creating a restore point, enable the restore points feature for that drive.

Enable-ComputerRestore -Drive C:

Create a system restore point

CheckPoint-Computer -Description "first"

Get system restore point

> Get-ComputerRestorePoint

CreationTime           Description                    SequenceNumber    EventType         RestorePointType
------------           -----------                    --------------    ---------         ----------------
                       first                          4                 BEGIN_SYSTEM_CHA… APPLICATION_INSTALL

Start a system restore

Run Restore-Computer to restore your system from a restore point. Specify the sequence number obtained by Get-ComputerRestorePoint in the -RestorePoint property.

Restore-Computer -RestorePoint 4

To restore from the previous restore point, use the -LastStatus switch instead of specifying the -RestorePoint parameter.: Restore-Computer -LastStatus

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment