PoshTip #46 – Creating Restore Points Using PowerShell

As described by Microsoft, restore points are created to allow users a choice of previous system states. Each restore point contains the necessary information needed to restore the system to the chosen state. Restore points are created before key changes are made to the system.

You can manage restore points by the GUI but you also can manage them with Powershell which is great for automation!

The first step is to enable the system restore feature on your hard drive:

PS > Enable-ComputerRestore -drive "C:\"

Now, I will create a restore point using the Checkpoint-Computer cmdlet:

PS > Checkpoint-Computer -description "My Restore Point" -restorepointtype "Modify_Settings"

Below are the acceptable values for “RestorePointType” parameter:

  • APPLICATION_INSTALL
  • APPLICATION_UNINSTALL
  • DEVICE_DRIVER_INSTALL
  • MODIFY_SETTINGS
  • CANCELLED_OPERATION

Note: The default is APPLICATION_INSTALL

To finish, you can check the new restore point:

PS > Get-ComputerRestorePoint | format-list

 

Thanks for reading! You can follow me on Twitter @PrigentNico

About Nicolas 282 Articles
I work as an IT Production Manager, based in Paris (France) with a primary focus on Microsoft technologies. I have 10 years experience in administering Windows Servers. . I am a Microsoft MVP for Cloud & Datacenter Management. I also received the PowerShell Hero 2016 award by PowerShell.0rg. And finally, I am "MCSE: Cloud Platform and Infrastructure", "MCSA: Windows Servers", "Administering & Deploying SCCM", and CheckPoint CCSA certified.