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”
Lets Start.
Run PowerShell as Administrator.
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 ….
Cool !!!! isnt ..
Thanks for reading…
Aman Dhally
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.