Skip to main content

Get-CrystalDiskInfo

Description

Gathers data pulled from the CrystalDiskInfo application.

Requirements

PowerShell V.5

Usage

  1. Downloads CrystalDiskInfo.
  2. Runs the executable silently.
  3. Parses the created .txt file.
  4. Generates objects based on the output.
  5. Returns the objects.

Executes the CrystalDiskInfo application and stores the basic information for all disks into a custom object.

$GetDiskInfo = .\Get-CrystalDiskInfo.ps1

Run the CrystalDiskInfo application with a threshold of 50 reallocated sectors. This way, the tool will only flag the disk as caution if the HDD has more than 50 reallocated sectors. Additionally, store the basic information for all disks in a custom object.

$GetDiskInfo = .\Get-CrystalDiskInfo.ps1 -ReallocatedSector 50

Parameters

ParameterAliasRequiredDefaultTypeDescription
ReallocatedSectorrFalseintSet the threshold for the number of reallocated sectors to mark an HDD as caution (not applicable to SSDs).

Output

Location of output for log, result, and error files.

.\Get-CrystalDiskInfo-log.txt
.\Get-CrystalDiskInfo-error.txt