CIM_LocalFileSystem

CIM Local File System
root/cimv2abstractkey : CreationClassNamekey : CSCreationClassNamekey : CSName

The CIM_LocalFileSystem class represents the file store controlled by a computer system through local means (for example, direct device-driver access).

On this page

Main example

List instances

# Abstract class: Get-CimInstance returns the instances of its subclasses
Get-CimInstance -ClassName CIM_LocalFileSystem |
    Select-Object -Property CSName, Name, Caption, Description, Status, InstallDate

Abstract class: it has no instances of its own. Get-CimInstance returns the instances of its subclasses.

Examples

Query a remote computer (CIM session)

review before running
# Name of the remote computer
$computerName = 'SERVER01'
# The CIM session (WSMan by default) can be reused for several queries
$cimSession = New-CimSession -ComputerName $computerName
try {
    Get-CimInstance -CimSession $cimSession -ClassName CIM_LocalFileSystem |
        Select-Object -Property CSName, Name, Caption, Description, Status, InstallDate
} finally {
    Remove-CimSession -CimSession $cimSession
}

WSMan (WinRM) is used by default. For a host without WinRM, create the session with -SessionOption (New-CimSessionOption -Protocol Dcom). Add -Credential to use another account.

Show the class structure

# Class structure: properties, types and flags (Key, ReadOnly…)
$cimClass = Get-CimClass -ClassName CIM_LocalFileSystem
$cimClass.CimClassProperties |
    Select-Object -Property Name, CimType, Flags

Properties

19 of 19 properties
NameTypeAccessDescription
AvailableSpaceuint64read

Amount of free space, in bytes, for the file system. If unknown, enter 0.

For more information about using uint64 values in scripts, see Scripting in WMI.

Unit: bytes

Code
# Abstract class: Get-CimInstance returns the instances of its subclasses
# Value of AvailableSpace for each instance
# AvailableSpace is expressed in bytes: converted to GB
Get-CimInstance -ClassName CIM_LocalFileSystem -Property CSName, AvailableSpace |
    Select-Object -Property @(
        'CSName'
        @{ Name = 'AvailableSpaceGB'; Expression = { [math]::Round($_.AvailableSpace / 1GB, 2) } }
    )
BlockSizeuint64read

Block size of the file system for data storage and retrieval.

For more information about using uint64 values in scripts, see Scripting in WMI.

Unit: bytes

Code
# Abstract class: Get-CimInstance returns the instances of its subclasses
# Value of BlockSize for each instance
# BlockSize is expressed in bytes: converted to GB
Get-CimInstance -ClassName CIM_LocalFileSystem -Property CSName, BlockSize |
    Select-Object -Property @(
        'CSName'
        @{ Name = 'BlockSizeGB'; Expression = { [math]::Round($_.BlockSize / 1GB, 2) } }
    )
Captionstringread

A short textual description of the object.

Code
# Abstract class: Get-CimInstance returns the instances of its subclasses
# Value of Caption for each instance
Get-CimInstance -ClassName CIM_LocalFileSystem -Property CSName, Caption |
    Select-Object -Property CSName, Caption
CasePreservedbooleanread

If TRUE, the case of file names are preserved.

Code
# Abstract class: Get-CimInstance returns the instances of its subclasses
# Value of CasePreserved for each instance
Get-CimInstance -ClassName CIM_LocalFileSystem -Property CSName, CasePreserved |
    Select-Object -Property CSName, CasePreserved
CaseSensitivebooleanread

If TRUE, case-sensitive file names are supported.

Code
# Abstract class: Get-CimInstance returns the instances of its subclasses
# Value of CaseSensitive for each instance
Get-CimInstance -ClassName CIM_LocalFileSystem -Property CSName, CaseSensitive |
    Select-Object -Property CSName, CaseSensitive
CodeSetuint16[]read

Array that defines the character sets or encoding supported by the file system.

Values (9)
ValueLabelDescription
0Unknown
1Other
2ASCII
3Unicode
4ISO2022
5ISO8859
6Extended UNIX Code
7UTF-8
8UCS-2
Code
# Abstract class: Get-CimInstance returns the instances of its subclasses
# Value of CodeSet for each instance
# Lookup table for CodeSet (values documented by Microsoft)
$codeSetName = @{
    0 = 'Unknown'
    1 = 'Other'
    2 = 'ASCII'
    3 = 'Unicode'
    4 = 'ISO2022'
    5 = 'ISO8859'
    6 = 'Extended UNIX Code'
    7 = 'UTF-8'
    8 = 'UCS-2'
}
# CodeSet is an array: -ExpandProperty returns its items one by one
Get-CimInstance -ClassName CIM_LocalFileSystem -Property CodeSet |
    Select-Object -ExpandProperty CodeSet |
    ForEach-Object -Process { $codeSetName[[int]$_] }
CompressionMethodstringread

Free-form string that indicates the algorithm or tool used to compress the logical file. If the compression scheme is unknown or not described, use "Unknown". If the logical file is compressed, but the compression scheme is unknown or not described, use "Compressed". If the logical file is not compressed, use "Not Compressed".

Code
# Abstract class: Get-CimInstance returns the instances of its subclasses
# Value of CompressionMethod for each instance
Get-CimInstance -ClassName CIM_LocalFileSystem -Property CSName, CompressionMethod |
    Select-Object -Property CSName, CompressionMethod
CreationClassName keystringread

Name of the class or subclass used in the creation of an instance. When used with other key properties of the class, this property allows all instances of the class and its subclasses to be uniquely identified.

Code
# Abstract class: Get-CimInstance returns the instances of its subclasses
# Value of CreationClassName for each instance
Get-CimInstance -ClassName CIM_LocalFileSystem -Property CSName, CreationClassName |
    Select-Object -Property CSName, CreationClassName
CSCreationClassName keystringread

Scoping computer system's creation class name.

Code
# Abstract class: Get-CimInstance returns the instances of its subclasses
# Value of CSCreationClassName for each instance
Get-CimInstance -ClassName CIM_LocalFileSystem -Property CSName, CSCreationClassName |
    Select-Object -Property CSName, CSCreationClassName
CSName keystringread

Scoping computer system's name.

Code
# Abstract class: Get-CimInstance returns the instances of its subclasses
# Value of CSName for each instance
Get-CimInstance -ClassName CIM_LocalFileSystem -Property CSName |
    Select-Object -Property CSName
Descriptionstringread

A textual description of the object.

Code
# Abstract class: Get-CimInstance returns the instances of its subclasses
# Value of Description for each instance
Get-CimInstance -ClassName CIM_LocalFileSystem -Property CSName, Description |
    Select-Object -Property CSName, Description
EncryptionMethodstringread

Free-form string that identifies the algorithm or tool used to encrypt a logical file. If the encryption scheme is not indulged (for security reasons, for example), use "Unknown". If the file is encrypted, but either its encryption scheme is unknown or not disclosed, use "Encrypted". If the logical file is not encrypted, use "Not Encrypted".

Code
# Abstract class: Get-CimInstance returns the instances of its subclasses
# Value of EncryptionMethod for each instance
Get-CimInstance -ClassName CIM_LocalFileSystem -Property CSName, EncryptionMethod |
    Select-Object -Property CSName, EncryptionMethod
FileSystemSizeuint64read

Size of the file system, in bytes. If unknown, enter 0 (zero).

For more information about using uint64 values in scripts, see Scripting in WMI.

Unit: bytes

Code
# Abstract class: Get-CimInstance returns the instances of its subclasses
# Value of FileSystemSize for each instance
# FileSystemSize is expressed in bytes: converted to GB
Get-CimInstance -ClassName CIM_LocalFileSystem -Property CSName, FileSystemSize |
    Select-Object -Property @(
        'CSName'
        @{ Name = 'FileSystemSizeGB'; Expression = { [math]::Round($_.FileSystemSize / 1GB, 2) } }
    )
InstallDatedatetimeread

Indicates when the object was installed. Lack of a value does not indicate that the object is not installed.

Code
# Abstract class: Get-CimInstance returns the instances of its subclasses
# Value of InstallDate for each instance
# CIM cmdlets already return a DateTime object: no conversion is needed
Get-CimInstance -ClassName CIM_LocalFileSystem -Property CSName, InstallDate |
    Select-Object -Property CSName, InstallDate
MaxFileNameLengthuint32read

Maximum length of a file name within the file system. A value of 0 (zero) indicates that there is no limit to the file name length.

Code
# Abstract class: Get-CimInstance returns the instances of its subclasses
# Value of MaxFileNameLength for each instance
Get-CimInstance -ClassName CIM_LocalFileSystem -Property CSName, MaxFileNameLength |
    Select-Object -Property CSName, MaxFileNameLength
Namestringread

Label by which the object is known. When subclassed, this property can be overridden to be a key property.

Code
# Abstract class: Get-CimInstance returns the instances of its subclasses
# Value of Name for each instance
Get-CimInstance -ClassName CIM_LocalFileSystem -Property CSName, Name |
    Select-Object -Property CSName, Name
ReadOnlybooleanread

If TRUE, the file system is designated as read only.

Code
# Abstract class: Get-CimInstance returns the instances of its subclasses
# Value of ReadOnly for each instance
Get-CimInstance -ClassName CIM_LocalFileSystem -Property CSName, ReadOnly |
    Select-Object -Property CSName, ReadOnly
Rootstringread

Path name or other information that defines the root of the file system.

Code
# Abstract class: Get-CimInstance returns the instances of its subclasses
# Value of Root for each instance
Get-CimInstance -ClassName CIM_LocalFileSystem -Property CSName, Root |
    Select-Object -Property CSName, Root
Statusstringread

String that indicates the current status of the object. Operational and non-operational status can be defined. Operational status can include "OK", "Degraded", and "Pred Fail". "Pred Fail" indicates that an element is functioning properly, but is predicting a failure (for example, a SMART-enabled hard disk drive).

Non-operational status can include "Error", "Starting", "Stopping", and "Service". "Service" can apply during disk mirror-resilvering, reloading a user permissions list, or other administrative work. Not all such work is online, but the managed element is neither "OK" nor in one of the other states.

Values include the following:

Values (12)
ValueLabelDescription
OKOK
ErrorError
DegradedDegraded
UnknownUnknown
Pred FailPred Fail
StartingStarting
StoppingStopping
ServiceService
StressedStressed
NonRecoverNonRecover
No ContactNo Contact
Lost CommLost Comm
Code
# Abstract class: Get-CimInstance returns the instances of its subclasses
# Value of Status for each instance
Get-CimInstance -ClassName CIM_LocalFileSystem -Property CSName, Status |
    Select-Object -Property CSName, Status

Remarks

The CIM_LocalFileSystem class is derived from CIM_FileSystem.

WMI does not implement this class.

This documentation is derived from the CIM class descriptions published by the DMTF. Microsoft may have made changes to correct minor errors, conform to Microsoft SDK documentation standards, or provide more information.

Inheritance

Superclass chain

  1. CIM_ManagedSystemElement
  2. CIM_LogicalElement
  3. CIM_FileSystem
  4. CIM_LocalFileSystem

Known subclasses

No known subclass.

Requirements

Namespace
root/cimv2
Minimum client
Windows Vista
Minimum server
Windows Server 2008
MOF file
CIMWin32.mof
DLL
CIMWin32.dll
Class qualifiers

Abstract UUID("{5B6C820A-E3D0-11d2-8601-0000F8102E5F}") AMENDMENT

Microsoft source

Source: Microsoft Learn

Descriptions, properties and methods come from the Microsoft documentation (MicrosoftDocs/win32 repository), published under the CC BY 4.0 licence. Formatting and translations are specific to this site; the PowerShell examples are written for it.