Aw, come on, here's a starter script, nudge nudge:

' ***************************************************************
' Created by Jesper Hanno Hansen, [EMAIL PROTECTED], www.Wbem.dk
' Use: Cscript MSStorageDriver_FailurePredictStatus.vbs
' ***************************************************************

Dim sServer
sServer = "."

DoMSStorageDriver_FailurePredictStatus

Sub DoMSStorageDriver_FailurePredictStatus
    On Error Resume Next

    Dim SWbemLocator
    Set SWbemLocator = CreateObject("WbemScripting.SWbemLocator")

    Dim SWbemServices
    Set SWbemServices = SWbemLocator.ConnectServer(sServer,"root\WMI")

    Dim objWbemObjectSet
Set objWbemObjectSet = SWbemServices.ExecQuery("Select * From MSStorageDriver_FailurePredictStatus", "WQL")

    Dim sProperty

    For Each sProperty in objWbemObjectSet
        DoWrite "Active", DoCheckIfEmpty(sProperty.Active)
      DoWrite "InstanceName", DoCheckIfEmpty(sProperty.InstanceName)
      DoWrite "PredictFailure", DoCheckIfEmpty(sProperty.PredictFailure)
      DoWrite "Reason", DoCheckIfEmpty(sProperty.Reason)
      Wscript.Echo
    Next
End Sub

Function DoCheckIfEmpty(sValue)
    If IsNull(sValue) Then
        DoCheckIfEmpty = "Empty"
    Else
        DoCheckIfEmpty = sValue
    End If
End Function

Sub DoWrite(sText, sValue)
    WScript.Echo sText & DoFormat(sText), sValue
End Sub

Function DoFormat(sText)
    DoFormat = Space(15 - Len(sText)) & " = "
End Function


Stan Zaske wrote:
Oh, I don't think so but thanks for the suggestion. @:D>


warpmedia wrote:

Roll your own with WMI & VBS.

http://www.microsoft.com/whdc/archive/smartdrv.mspx


Stan Zaske wrote:

I'm currently trying out the 30 day nagware version of S.M.A.R.T. Disk Monitor that seems pretty good. Unfortunately, the $20 personal version is limited to 2 disks and no email notification. The uncrippled Corporate/Server version is $40 which I think is rather steep. If there's something adequate that's free it would be of great benefit to us all.





Reply via email to