en-us/about_DiskSmartInfo_attributes.help.txt

ABOUT DISKSMARTINFO ATTRIBUTES
 
SHORT DESCRIPTION
 
Describes SMART attribute definitions used by commands of DiskSmartInfo module.
 
LONG DESCRIPTION
 
SMART attributes are defined in four files, located in the attributes folder:
    default.ps1
    proprietary.ps1
    nvme.ps1
    descriptions.ps1
 
 
DEFAULT ATTRIBUTES
 
default.ps1 contains attribute definitions, that are used in all cases,
when they are not redefined by proprietary attributes.
 
The structure of default attribute definition is as follows:
    AttributeID
    AttributeName
    DataFormat
    IsCritical
    CriticalThreshold
    ConvertScriptBlock
 
AttributeID is a numerical value, that defines attribute number.
 
AttributeName is a string value, that specifies the name of an attribute.
 
DataFormat is an enum type value, that defines attribute data structure.
 
IsCritical is a boolean, specifying whether an attribute is critical.
 
CriticalThreshold is a value, that defines the critical threshold for the attribute,
that is used by the Get-DiskSmartInfo command with the -Quiet parameter.
 
ConvertScriptBlock is a ScriptBlock type value, that defines conversion process,
that is used by the Get-DiskSmartInfo command with the -Convert parameter.
 
 
PROPRIETARY ATTRIBUTES
 
proprietary.ps1 contains data structure, that consists of different device families.
 
Each device family object has three properties:
    Family
    ModelPatterns
    Attributes
 
Family property is a string, used as a custom name for the device family.
This property is not used by the commands.
 
ModelPatterns is an array of strings. Each of them represents regular expression,
used by the Get-DiskSmartInfo command to compare with the model of the processed
disks. When there is a match, attributes from that family are added to actual
attribute set.
 
If selected family contains an attribute with id, that is already defined
in default attributes, proprietary attribute replaces default one.
 
Attributes property is an array of attribute definitions. The structure of the
proprietary attribute definition corresponds to the structure of default
attribute definition:
    AttributeID
    AttributeName
    DataFormat
    IsCritical
    CriticalThreshold
    ConvertScriptBlock
 
However for proprietary attribute definitions IsCritical, CriticalThreshold,
and ConvertScriptBlock properties are optional.
 
If these three properties are defined, matched set proprietary attribute definition
is fully replaces the default one.
 
If any of these properties (or all three of them) is not specified in the proprietary
attribute definition, then the resulting attribute definition will retain original
(default) value of this property.
 
For example, if there is a default attribute with the following definition:
 
    AttributeID = n
    AttributeName = 'Attribute Name'
    DataFormat = [AttributeDataFormat]::bits24
    IsCritical = $true
    CriticalThreshold = 0
    ConvertScriptBlock = {$args[0] * 1000}
 
and proprietary attribute with the following definition:
 
    AttributeID = n
    AttributeName = 'New Attribute Name'
    DataFormat = [AttributeDataFormat]::bits48
 
then resulting attribute definition will be:
 
    AttributeID = n
    AttributeName = 'New Attribute Name'
    DataFormat = [AttributeDataFormat]::bits48
    IsCritical = $true
    CriticalThreshold = 0
    ConvertScriptBlock = {$args[0] * 1000}
 
 
New disk models and proprietary definitions should be added to this file.
 
 
NVME ATTRIBUTES
 
nvme.ps1 contains data structure, that consists of different device families.
 
Each device family object has three properties:
    Family
    ModelPatterns
    Attributes
 
Family property is a string, used as a custom name for the device family.
This property is not used by the commands.
 
ModelPatterns is an array of strings. Each of them represents regular expression,
used by the Get-DiskSmartInfo command to compare with the model of the processed
disks. When there is a match, attributes from that family are added to actual
attribute set.
 
Attributes property is an array of attribute definitions. The structure of the
nvme attribute definition is as follows:
    AttributeName
    IsCritical
 
AttributeName is a string value, that specifies the name of an attribute.
 
AttributeName property can be specified using wildcards.
 
IsCritical is a ScriptBlock, specifying whether an attribute is in critical state.
 
If IsCritical property is present for an attribute, this attribute is considered critical.
If this property (or the whole attribute definition) is not present,
this attribute is considered not critical.
 
New nvme disk models and their attribute definitions should be added to this file.
 
 
DESCRIPTIONS
 
descriptions.ps1 contains descriptions of the default attributes, that are used
by the Get-DiskSmartAttributeDescription command.
 
 
SEE ALSO
 
about_DiskSmartInfo_config