WMI Chkdsk Action

The WMI Chkdsk action invokes the chkdsk operation on the disk via WMI. The method is applicable to only those instances of logical disk that represent a physical disk in the machine. It is not applicable to mapped logical drives.

Client - Requires Windows Vista or Windows XP.

Server - Requires Windows Server "Longhorn" or Windows Server 2003.

![](/images/actions-reference/windows-os/wmi-actions/WMI Chkdsk-Options.png")

Machine Name

Enter the name of the remote machine, or leave blank for localhost

Drive Letter

Select the drive letter. If you want to set this dynamically, set it in the BeforeAction script event. See below.

Fix Errors

Indicates what should be done to errors found on the disk. If true, then errors are fixed. The default is false.

Vigorous Index Check

If true, a vigorous check of index entries should be performed. The default is true.

Skip Folder Cycle

If true, the folder cycle checking should be skipped. The default is true.

Force Dismount

If true, the drive should be forced to dismount before checking. The default is false.

Recover Bad Sectors

If true, the bad sectors should be located and the readable information should be recovered from these sectors. The default is false.

OK To Run At Boot Up

If true, the chkdsk operation should be performed at next boot up time, in case the operation could not be performed because the disk is locked at time the method is called. The default is false.

Fail if scheduled for reboot - If true and the chkdsk returns that it has scheduled to run at boot up time, then the action will fail

You can set the various properties of the action via script. For example, to set the Drive Letter via script:

BeforeAction Script Event:

Action.PropertyStore.DriveLetter = TheDriveLetter

Where "TheDriveLetter" is a variable that has been set to a valid drive on the machine, in the format <DriveLetter>:

eg. E: or C: