Drive type detection and drive health.
This agent procedure detects the type of hard drive the Windows OS is using. Either HDD, SSD, or Virtual. It also gets the health (for HDD and SSD), the SSD Wear and Power on Hours, and any HDD Read Errors.
This script uses PowerShell commands only available to Windows 8 and above including Windows Server 2012 and above. It is important to mention that this script is designed for the C drive but you can edit the script to check other drives. Also, this has not been tested on RAID arrays... Any feedback would be greatly appreciated.
This Agent Procedure requires Custom Fields to be created exactly as they appear in the included Documentation PRIOR to importing the Agent Procedures. Most of the times the Custom Fields will match so you do not have to edit the Agent Procedure. There is a possibility that the import doesn’t detect the Custom Fields and you will have to edit the Agent Procedure.
Detect HDD or SSD plus SMART Health has no reviews.
This Agent Procedure together with the Windows System Stability Index Agent Procedure (https://automationexchange.kaseya.com/products/619) will be very helpful in judging the reliability of a system.
I've got an errors:
Failed THEN in step 34 (Line 51)
Failed ELSE in step 2 (Line 60)
Tried several times.
Firstly I've created Custom Fields and run procedure. Tried on two computers with SSD disks.
I am getting the same errors that Dmitrij is getting.
I am also getting the same errors and I have tried on around 15 machines which all have different specs. Not once has it done a successful run.
Some reports say SSD Wear 0
ANd some say SSD Wear 100
Doesn't run for me - all tests show Failed THEN in step 34 (Line 51)
Fix for: Failed THEN in step 34 (Line 51) and possibly any others go through and ensure all the CF fields are mapped. There shouldn't be any blanks. Just testing on a failing drive
It looks like there is a problem with the initial instructions. Number 4 should read SSD Power on Hours (C:) instead of SSD Power no Hours (C:)
This spelling mistake will not allow for the agent procedure to automatically detect the custom field. You can leave it incorrect but then you have to manually edit the agent procedure and manually select the field.
And Dri ve Type I've just noticed
Caught quite a few drives with read errors so far so great when you get it going. Also added in the create ticket when it goes above a threshold. Got one SSD with 100 wear but there is a firmware update (Kingston) that apparently makes wear levels more accurate.
I've noticed a few of the SSD drives have reported back "SSD Power on Hours (C:)" as "ÿþ". Something is off there unless that is expected if it can't pull the data.
Also, Dale is spot on with the spelling error on the CF in question. Change it from no to on and it will function as expected.
I found that if you modify the text output for the powershell commands, the "ÿþ" problem goes away.
(Get-Disk 0 | Get-StorageReliabilityCounter).PowerOnHours >> vAgentConfiguration.agentTempDir#\PowerOnHours.txt
(Get-Disk 0 | Get-StorageReliabilityCounter).PowerOnHours | Out-File -FilePath #vAgentConfiguration.agentTempDir#\PowerOnHours.txt -encoding ASCII
That seems to have fixed it. Thanks
Thank you, M
Does anyone have an idea how to correct the unknown drive type?