MSFT_Volume class

Represents a volume on a computer.

The following syntax is simplified from Managed Object Format (MOF) code.

Syntax

class MSFT_Volume : MSFT_StorageObject
{
  Char16 DriveLetter;
  String Path;
  UInt16 HealthStatus;
  String FileSystem;
  String FileSystemLabel;
  UInt16 FileSystemType;
  UInt64 Size;
  UInt64 SizeRemaining;
  UInt32 DriveType;
  UInt32 DedupMode;
};

Members

The MSFT_Volume class has these types of members:

Methods

The MSFT_Volume class has these methods.

Method Description
DeleteObject Deletes the volume.
Diagnose Performs a diagnostic on the volume, returning any actionable results.
Flush Flushes the cached data in the volume's file system to disk.
Format Formats the volume.
GetAttributes Retrieves the volume attributes.
GetCorruptionCount Retrieves the corruption count for the volume.
GetDedupProperties Gets deduplication properties of the volume.
GetSupportedClusterSizes Retrieves the supported cluster sizes for the volume.
GetSupportedFileSystems Retrieves the names of file systems that are supported on the volume.
Optimize Optimizes the volume.
Repair Repairs the volume.
Resize Resizes the volume.
SetAttributes Sets or changes the volume attributes.
SetDedupMode Enables or disables deduplication on the volume.
SetFileSystemLabel Sets the file system label for the volume.

Properties

The MSFT_Volume class has these properties.

DedupMode

Data type: UInt32

Access type: Read-only

Starting in Windows 10: Indicates whether deduplication is available, disabled, or the deduplication mode of the volume.

Disabled (0)

GeneralPurpose (1)

HyperV (2)

Backup (3)

NotAvailable (4)

DriveLetter

Data type: Char16

Access type: Read-only

The volume drive letter.

DriveType

Data type: UInt32

Access type: Read-only

The type of the volume.

Unknown (0)

Invalid Root Path (1)

Removable (2)

Fixed (3)

Remote (4)

CD-ROM (5)

RAM Disk (6)

FileSystem

Data type: String

Access type: Read-only

The volume's file system. One of the following:

  • "NTFS"
  • "ReFS"
  • "FAT32"
  • "CSVFS"

FileSystemLabel

Data type: String

Access type: Read-only

The volume's file system label.

FileSystemType

Data type: UInt16

Access type: Read-only

Starting in Windows 10: The underlying file system on the volume. It can have one of the following values:

Unknown (0)

(Threshold)

UFS (2)

HFS (3)

FAT (4)

FAT16 (5)

FAT32 (6)

NTFS4 (7)

NTFS5 (8)

XFS (9)

AFS (10)

EXT2 (11)

EXT3 (12)

ReiserFS (13)

NTFS (14)

ReFS (15)

CSVFS_NTFS (0x8000)

CSVFS_ReFS (0x8001)

HealthStatus

Data type: UInt16

Access type: Read-only

The health status of the volume.

Healthy (0)

Scan Needed (1)

Spot Fix Needed (2)

Full Repair Needed (3 )

Path

Data type: String

Access type: Read-only

Qualifiers: Required

The volume path.

Size

Data type: UInt64

Access type: Read-only

Qualifiers: Units ("Bytes")

Total size, in bytes, of the volume.

SizeRemaining

Data type: UInt64

Access type: Read-only

Qualifiers: Units ("Bytes")

The total space, in bytes, that is currently free on the volume.

Remarks

Starting in Windows 10: MSFT_Volume derives from MSFT_StorageObject. It now inherits the property ObjectId, which was formerly a property of MSFT_Volume.

Requirements

Requirement Value
Minimum supported client Windows 8 [desktop apps only]
Minimum supported server Windows Server 2012 [desktop apps only]
Namespace Root\Microsoft\Windows\Storage
MOF Storagewmi.mof