Reference Guide

'*** Set up the output file
Set ColSystem=objWMIService.execquery ("Select * from " & strClassName)
outString = "RAID Status = "
For Each objItem in ColSystem
For Each p in objItem.Properties_
If p.Name = "RAIDStatus" Then
Select Case p.Value
Case 0
outString = outString & "Unknown" & VbCrLf
Case 1
outString = outString & "Ready" & VbCrLf
Case 2
outString = outString & "Online" & VbCrLf
Case 3
outString = outString & "Foreign" & VbCrLf
Case 4
outString = outString & "Offline" & VbCrLf
Case 5
outString = outString & "Blocked" & VbCrLf
Case 6
outString = outString & "Failed" & VbCrLf
Case 7
outString = outString & "Degraded" & VbCrLf
Case 8
outString = outString & "Rebuilding" & VbCrLf
End Select
End If
Next
Next
Wscript.StdOut.WriteLine outString
'*** If any errors occurred, let the user know
If Err.Number <> 0 Then
WScript.Echo "Enabling Trusted Platform Module failed."
End If
374