MSStorageDriver powershell sample code
The foundations for Manageability in Windows is Windows Management Instrumentation (WMI; formerly WBEM) and WMI extensions for Windows Driver Model (WDM).
ActiveXperts Network Monitor provides the ability to build monitor check routines based on WMI. ActiveXperts has collected more than a hundred WMI samples. You can use these samples as a base for new check routines you can write yourself. The MSStorageDriver WMI class can be used in ActiveXperts Network Monitor to monitor your servers.
Sample Code
$strComputer = "." $objWMi = get-wmiobject -namespace root\WMI -computername localhost -Query "Select * from MSStorageDriver_ATAPISmartData" foreach ($obj in $objWmi) { write-host "Active:" $obj.Active write-host "Checksum:" $obj.Checksum write-host "ErrorLogCapability:" $obj.ErrorLogCapability write-host "ExtendedPollTimeInMinutes:" $obj.ExtendedPollTimeInMinutes write-host "InstanceName:" $obj.InstanceName write-host "Length:" $obj.Length write-host "OfflineCollectCapability:" $obj.OfflineCollectCapability write-host "OfflineCollectionStatus:" $obj.OfflineCollectionStatus write-host "Reserved:" $obj.Reserved write-host "SelfTestStatus:" $obj.SelfTestStatus write-host "ShortPollTimeInMinutes:" $obj.ShortPollTimeInMinutes write-host "SmartCapability:" $obj.SmartCapability write-host "TotalTime:" $obj.TotalTime write-host "VendorSpecific:" $obj.VendorSpecific write-host "VendorSpecific2:" $obj.VendorSpecific2 write-host "VendorSpecific3:" $obj.VendorSpecific3 write-host "VendorSpecific4:" $obj.VendorSpecific4 write-host write-host "########" write-host }