This topic has not yet been rated - Rate this topic

Chkdsk method of the Win32_Volume class

The Chkdsk method invokes the Chkdsk operation on the volume. The method is only applicable to volume instances that represent a physical disk on the computer. It is not applicable to mapped logical drives.

This topic uses Managed Object Format (MOF) syntax. For more information about using this method, see Calling a Method.

Syntax


uint32 Chkdsk(
  [in]  boolean FixErrors = FALSE,
  [in]  boolean VigorousIndexCheck = TRUE,
  [in]  boolean SkipFolderCycle = TRUE,
  [in]  boolean ForceDismount = FALSE,
  [in]  boolean RecoverBadSectors = FALSE,
  [in]  boolean OkToRunAtBootUp = FALSE
);

Parameters

FixErrors [in]

If true, errors found on the disk are fixed. The default is false.

VigorousIndexCheck [in]

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

SkipFolderCycle [in]

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

ForceDismount [in]

If true, the volume is dismounted before checking. The default is false.

RecoverBadSectors [in]

If true, the bad sectors are located and the readable information is recovered. The default is false.

OkToRunAtBootUp [in]

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

Return value

Return codeDescription
0

Success - Chkdsk Completed

1

Success - Volume Locked and Chkdsk Scheduled on Reboot

2

Unsupported File System

3

Unknown File System

4

No Media In Drive

5

Unknown Error

 

Examples

For script code examples, see WMI Tasks for Scripts and Applications and the TechNet ScriptCenter Script Repository.

For C++ code examples, see WMI C++ Application Examples.

Requirements

Minimum supported client

None supported [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Namespace

\root\CIMV2

MOF

Vds.mof

DLL

Vdswmi.dll

See also

Win32_Volume

 

 

Send comments about this topic to Microsoft

Build date: 11/19/2012

Community Additions

ADD
© 2013 Microsoft. All rights reserved.