Monday, August 15, 2016

Restore point creation with command prompt

his method shows you how to open System Restore using Command Prompt
Please perform the following steps:
In the Command Prompt or in run windows type

systempropertiesprotection
Please press Enter to execute

OR

In the Command Prompt type the below command

wmic.exe /Namespace:\\root\default Path SystemRestore Call CreateRestorePoint "My Shortcut Restore Point", 100, 7

TIP : to view system icons if unable to see any icon in change icon settings then go to following path
C:\Windows\System32\imageres.dll
ok

System Restore is implemented using the Volume Shadow Copy Service (Volume Snapshot Service, VSS). As such, you can use vssadmin in an elevated command prompt to list all of the restore points:
vssadmin List Shadows
Note that Windows Backup also uses VSS, with shadow copies stored on both the system and backup drives, so if your backup drive is connected, the shadow copies stored on the backup drive corresponding to these backups will be listed as well. Add /for=C: to specify the volume you want to list the shadow copies for, replacing C: with the volume letter of your choice if it is not C:.
While this isn't the easiest way to work with restore points, you can use the creation date and time and shadow copy ID listed in the output from the above command to delete specific restore points, using the vssadmin Delete Shadows command. You can also create restore points with vssadmin Create Shadow and change the amount of space available to restore points with vssadmin Resize ShadowStorage.
  • vssadmin list shadowstorage - This command lists all connected hard drives and their used, allocated and maximum shadow copy storage space.
  • vssadmin list shadows - This command lists all existing shadow copies on the system
  • vssadmin delete shadows /for=c: /oldest - This command deletes the oldest shadow copy on drive C
  • vssadmin delete shadows /for=d: /all - This command deletes all existing shadow copies on drive D
  • vssadmin delete shadows /for=c: /shadow=ID - Deletes the selected shadow copy. The IDs are listed when you use the list shadows command.
  • vssadmin resize shadowstorage /for=c: /maxsize=2GB - Sets the shadow storage for drive C to 2 Gigabyte. May delete existing restore points starting with the oldest if space is not sufficient to store all System Restore points
Run Powershell as an administrator. At the prompt:
Get-ComputerRestorePoint
This will list all the system restore points.
Powershell offers 4 Cmdlets to manage system restore and/or restore points:
  1. Disable-ComputerRestore
  2. Enable-ComputerRestore
  3. Get-ComputerRestorePoint
  4. Restore-Computer
For assistance with any of them, you can add get-help in front of the Cmdlet, i.e.
get-help Get-ComputerRestorePoint

No comments:

Post a Comment