Showing posts with label System Restore Point and PowerShell. Show all posts
Showing posts with label System Restore Point and PowerShell. Show all posts

Thursday, February 2, 2012

Get the list of all windows “System Restore Points” using PowerShell.

 

Hi,

if you remember yesterday we created a windows “System Restore Point” using Poweshell. Today we are going to check the list of all “System restore points” created by windows.

The cmdlet which we are going to use is “Get-ComputerRestorePoint

Note: Make sure that you run PowerShell as “Administrator”

01-02-2012 19-59-57

Lets run the cmdlet

Here it showing the list of all restore points.

01-02-2012 20-11-40

if you want to view the details of any specific “Restore Point” then use -RestorePoint and the sequence number.

Get-ComputerRestorePoint -RestorePoint 81

01-02-2012 20-14-26

want to cross check?

Ok!, Open the “System Restore” in Accessories and compare it with the output of the Get-ComputerRestorePoint, make sure you ticked on “Show More restore Points” to view all the “restore points”

01-02-2012 20-21-11

If previously you tried to restore laptop using the “System Restore Point” and want to check the result of restoration process use the -LastStatus parameter.

Get-ComputerRestorePointLastStatus

and my previously restoration of laptop was failed :D

01-02-2012 20-17-58

Thanks for reading…

Aman Dhally

Aman Dhally

Wednesday, February 1, 2012

Create a System Restore Point Using PowerShell.

 

Hi,

Today i was testing some scripts for un-installation of one of our software and i want to create a “System Restore Point” before doing so. In previous days i used some “VB Script” to create a system restore point. But now i know that “PowerShell” can do this, i search for the CMDLET which can do this and i found it.

Currently if we need to create a restore point we need to , Click on “Start”, Click on “All Programs”, Click on “Accessories”, click on “System Tools” and then select “System Restore”.

Pooh!!!! time consuming”

Lets do it using PowerShell and the cmdlet which create a “System Restore Point” is “Checkpoint-Computer

Note: Make Sure you run PowerShell as "Administrator” other wise it give you “Access Denied

01-02-2012 18-08-30

Lets Start.

Run PowerShell as Administrator.

01-02-2012 18-09-32

Type the below command .

In –Description you can provide  a relevant info about the restore point and by default  -RestorePointType type is Application_Install and the other Valid values are , APPLICATION_UNINSTALL, DEVICE_DRIVER_INSTALL, MODIFY_SETTINGS, and CANCELLED_OPERATION.

Checkpoint-Computer -Description "Uninstall Software using Script" -RestorePointType "APPLICATION_UNINSTALL" –Verbose

You ca see it creating the restore point ….

01-02-2012 18-15-20 

When it finish done creating the restore point it come back to the PS Prompt.

Let Cross-Check that it created the restore point or not.

Open the “System Restore

01-02-2012 18-15-53 

Click on “Next”

01-02-2012 18-16-34 

and “here is the “Restore Point” which is created by us using PowerShell..

01-02-2012 18-17-12

Cool !!!! isnt ..

Thanks for reading…

Aman Dhally

Aman Dhally