Emnico in Swindon and its partners
in the UK and Europe provide:

» IT Support Services and Products
» Bespoke Software Development


Contact our Swindon office on:
+44 (0)1793 614 700
to discuss your IT needs.


CLOSE IT
Emnico Logo
Your Virtual Technology Team
Delivering Peak Performance
Category: Type: Order:
Search For:  
Home > Library > List Restore Points

List Restore Points

If system restore is enabled, this script will list all restore points created.
Added 283 days ago by Emnico
Download
Review
Back
64Views
This script has been successfully tested by Emnico and is verified to be working.

Source code

Set dtmConvertedDate = CreateObject("WbemScripting.SWbemDateTime")
 
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\default")

Set colItems = objWMIService.ExecQuery("Select * from SystemRestore")
If colItems.Count = 0 Then
    WScript.Echo "No restore point in system."
Else
    For Each objItem in colItems
        Wscript.Echo "Name: " & objItem.Description
        Wscript.Echo "Number: " & objItem.SequenceNumber
        Select Case objItem.RestorePointType
      Case 0 strRestoreType = "Application installation"
            Case 1 strRestoreType = "Application uninstall"
            Case 6 strRestoreType = "Restore"
            Case 7 strRestoreType = "Checkpoint"
            Case 10 strRestoreType = "Device drive installation"
            Case 11 strRestoreType = "First run"
            Case 12 strRestoreType = "Modify settings"
            Case 13 strRestoreType = "Cancelled operation"
            Case 14 strRestoreType = "Backup recovery"
            Case Else strRestoreType = "Unknown"
        End Select
        Wscript.Echo "Restore Point Type: " & strRestoreType
 
        dtmConvertedDate.Value = objItem.CreationTime
        dtmCreationTime = dtmConvertedDate.GetVarDate
        Wscript.Echo "Time: " & dtmCreationTime
     Next
End If


| Privacy policy | Environmental policy | Site map |