You can use the EnumBackups method of the IIsComputer object to enumerate metabase backups stored in one or more backup locations, retrieving the location, version number and date of each backup.
IIsComputer.EnumBackups BkupLocIn, IndexIn, BkupVerOut, BkupLocOut, BkupDateTimeOut
<%@ LANGUAGE=VBScript %> <SCRIPT LANGUAGE = "JScript" RUNAT = SERVER> var TempDate = new Date(); TempDif = TempDate.getTimezoneOffset(); Session("sTempDif") = TempDif; </SCRIPT> <% Dim CompObj, Index, Version, Location, GMTDate, LocDate, MinDif MinDif = Session("sTempDif") On Error Resume Next Set CompObj = GetObject("IIS://LocalHost") Index = 0 ' Iterate until method returns an error Do While True ' Empty location input string means enumerate all locations CompObj.EnumBackups "", Index, Version, Location, GMTDate If Err.Number <> 0 Then ' If error returned, no more backups to enumerate Exit Do End If Response.Write Version & ", " Response.Write Location & ", " Response.Write GMTDate & ", " ' Convert to server local date time LocDate = DateAdd("n", (-MinDif), GMTDate) Response.Write "(" & LocDate & ")" Response.Write "<BR>" Index = Index + 1 Loop %>