MSFT_Volume class

Represents a volume on a computer.

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

Syntax

class MSFT_Volume
{
  String ObjectId;
  Char16 DriveLetter;
  String Path;
  UInt16 HealthStatus;
  String FileSystem;
  String FileSystemLabel;
  UInt64 Size;
  UInt64 SizeRemaining;
  UInt32 DriveType;
};

Members

The MSFT_Volume class has these types of members:

Methods

The MSFT_Volume class has these methods.

MethodDescription
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.

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.

SetAttributes

Sets or changes the volume attributes.

SetFileSystemLabel

Sets the file system label for the volume.

 

Properties

The MSFT_Volume class has these properties.

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.

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 )
ObjectId
Data type: String
Access type: Read-only
Qualifiers: Key

Unique identifier for the volume.

Path
Data type: String
Access type: Read-only

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.

Requirements

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

 

 

Community Additions

ADD
Show:
© 2014 Microsoft