Inputs: Drive letters (or all), and analyze-only option.
Minimum ITScripts engine version required: 22.214.171.124
Modifies the target machine: Yes
Name: Check Disk
Outputs: Output from running chkdsk on target machines
Purpose: Check fixed disk(s) for errors. Set the 'analyzeOnly' parameter to $false to fix errors (this will succeed only if the the
Script Version: 126.96.36.199
Target Type: Any
This script queries WMI to determine the Logical Disks on the target. Using the input provided the script will execute the command to run check disk by using the following command:
"cmd /c Chkdsk.exe $volume 1>$fileName 2>&1"
Possible outputs for this script are as follows:
"None of selected drives found ($driveLetters)"
"Volume $volume is is marked as dirty. Chkdsk should run on next reboot."
"Chkdsk complete on $volume"
"Chkdsk cannot run because the volume is in use"