| AccessMask# | uint32 | read | Bit array that represents the access rights to the given file or directory held by the user or group on whose behalf the instance is returned. On FAT volumes, FULL_ACCESS is returned, which indicates that no security has been set on the object. Values (14)| Value | Label | Description |
|---|
| 1 | FILE_READ_DATA (file) or FILE_LIST_DIRECTORY (directory) | Grants the right to read data from the file. For a directory, this value grants the right to list the contents of the directory. | | 2 | FILE_WRITE_DATA (file) or FILE_ADD_FILE (directory) | Grants the right to write data to the file. For a directory, this value grants the right to create a file in the directory. | | 4 | FILE_APPEND_DATA (file) or FILE_ADD_SUBDIRECTORY (directory) | Grants the right to append data to the file. For a directory, this value grants the right to create a subdirectory. | | 8 | FILE_READ_EA | Grants the right to read extended attributes. | | 16 | FILE_WRITE_EA | Grants the right to write extended attributes. | | 32 | FILE_EXECUTE (file) or FILE_TRAVERSE (directory) | Grants the right to execute a file. For a directory, the directory can be traversed. | | 64 | FILE_DELETE_CHILD (directory) | Grants the right to delete a directory and all the files it contains (its children), even if the files are read-only. | | 128 | FILE_READ_ATTRIBUTES | Grants the right to read file attributes. | | 256 | FILE_WRITE_ATTRIBUTES | Grants the right to change file attributes. | | 65536 | DELETE | Grants delete access. | | 131072 | READ_CONTROL | Grants read access to the security descriptor and owner. | | 262144 | WRITE_DAC | Grants write access to the discretionary ACL. | | 524288 | WRITE_OWNER | Assigns the write owner. | | 1048576 | SYNCHRONIZE | Synchronizes access and allows a process to wait for an object to enter the signaled state. |
Code# Abstract class: Get-CimInstance returns the instances of its subclasses
# Value of AccessMask for each instance
# Lookup table for AccessMask (values documented by Microsoft)
$accessMaskName = @{
1 = 'FILE_READ_DATA (file) or FILE_LIST_DIRECTORY (directory)'
2 = 'FILE_WRITE_DATA (file) or FILE_ADD_FILE (directory)'
4 = 'FILE_APPEND_DATA (file) or FILE_ADD_SUBDIRECTORY (directory)'
8 = 'FILE_READ_EA'
16 = 'FILE_WRITE_EA'
32 = 'FILE_EXECUTE (file) or FILE_TRAVERSE (directory)'
64 = 'FILE_DELETE_CHILD (directory)'
128 = 'FILE_READ_ATTRIBUTES'
256 = 'FILE_WRITE_ATTRIBUTES'
65536 = 'DELETE'
131072 = 'READ_CONTROL'
262144 = 'WRITE_DAC'
524288 = 'WRITE_OWNER'
1048576 = 'SYNCHRONIZE'
}
Get-CimInstance -ClassName CIM_DeviceFile -Property CSName, FSCreationClassName, AccessMask |
Select-Object -Property @(
'CSName'
'FSCreationClassName'
@{ Name = 'AccessMask'; Expression = { $accessMaskName[[int]$_.AccessMask] } }
)
|
| Archive# | boolean | read | If True, the file should be archived. Code# Abstract class: Get-CimInstance returns the instances of its subclasses
# Value of Archive for each instance
Get-CimInstance -ClassName CIM_DeviceFile -Property CSName, FSCreationClassName, Archive |
Select-Object -Property CSName, FSCreationClassName, Archive
|
| Caption# | string | read | 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_DeviceFile -Property CSName, FSCreationClassName, Caption |
Select-Object -Property CSName, FSCreationClassName, Caption
|
| Compressed# | boolean | read | If True, the file is compressed. Code# Abstract class: Get-CimInstance returns the instances of its subclasses
# Value of Compressed for each instance
Get-CimInstance -ClassName CIM_DeviceFile -Property CSName, FSCreationClassName, Compressed |
Select-Object -Property CSName, FSCreationClassName, Compressed
|
| CompressionMethod# | string | read | 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_DeviceFile -Property CSName, FSCreationClassName, CompressionMethod |
Select-Object -Property CSName, FSCreationClassName, CompressionMethod
|
| CreationClassName# key | string | read | Code# Abstract class: Get-CimInstance returns the instances of its subclasses
# Value of CreationClassName for each instance
Get-CimInstance -ClassName CIM_DeviceFile -Property CSName, FSCreationClassName, CreationClassName |
Select-Object -Property CSName, FSCreationClassName, CreationClassName
|
| CreationDate# | datetime | read | Code# Abstract class: Get-CimInstance returns the instances of its subclasses
# Value of CreationDate for each instance
# CIM cmdlets already return a DateTime object: no conversion is needed
Get-CimInstance -ClassName CIM_DeviceFile -Property CSName, FSCreationClassName, CreationDate |
Select-Object -Property CSName, FSCreationClassName, CreationDate
|
| CSCreationClassName# key | string | read | Class of the computer system. Code# Abstract class: Get-CimInstance returns the instances of its subclasses
# Value of CSCreationClassName for each instance
Get-CimInstance -ClassName CIM_DeviceFile -Property CSName, FSCreationClassName, CSCreationClassName |
Select-Object -Property CSName, FSCreationClassName, CSCreationClassName
|
| CSName# key | string | read | Name of the computer system. Code# Abstract class: Get-CimInstance returns the instances of its subclasses
# Value of CSName for each instance
Get-CimInstance -ClassName CIM_DeviceFile -Property FSCreationClassName, CSName |
Select-Object -Property FSCreationClassName, CSName
|
| Description# | string | read | 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_DeviceFile -Property CSName, FSCreationClassName, Description |
Select-Object -Property CSName, FSCreationClassName, Description
|
| Drive# | string | read | Drive letter (including the colon that follows the drive letter) of the file. This property is inherited from CIM_LogicalFile. Example: "c:" Code# Abstract class: Get-CimInstance returns the instances of its subclasses
# Value of Drive for each instance
Get-CimInstance -ClassName CIM_DeviceFile -Property CSName, FSCreationClassName, Drive |
Select-Object -Property CSName, FSCreationClassName, Drive
|
| EightDotThreeFileName# | string | read | DOS-compatible file name for the file. This property is inherited from CIM_LogicalFile. Example: "c:\progra~1" Code# Abstract class: Get-CimInstance returns the instances of its subclasses
# Value of EightDotThreeFileName for each instance
Get-CimInstance -ClassName CIM_DeviceFile -Property CSName, FSCreationClassName, EightDotThreeFileName |
Select-Object -Property CSName, FSCreationClassName, EightDotThreeFileName
|
| Encrypted# | boolean | read | If True, the file is encrypted. Code# Abstract class: Get-CimInstance returns the instances of its subclasses
# Value of Encrypted for each instance
Get-CimInstance -ClassName CIM_DeviceFile -Property CSName, FSCreationClassName, Encrypted |
Select-Object -Property CSName, FSCreationClassName, Encrypted
|
| EncryptionMethod# | string | read | 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_DeviceFile -Property CSName, FSCreationClassName, EncryptionMethod |
Select-Object -Property CSName, FSCreationClassName, EncryptionMethod
|
| Extension# | string | read | File name extension without the preceding period (dot). Example: "txt", "mof", "mdb" Code# Abstract class: Get-CimInstance returns the instances of its subclasses
# Value of Extension for each instance
Get-CimInstance -ClassName CIM_DeviceFile -Property CSName, FSCreationClassName, Extension |
Select-Object -Property CSName, FSCreationClassName, Extension
|
| FileName# | string | read | File name without the file name extension. Example: "MyDataFile" Code# Abstract class: Get-CimInstance returns the instances of its subclasses
# Value of FileName for each instance
Get-CimInstance -ClassName CIM_DeviceFile -Property CSName, FSCreationClassName, FileName |
Select-Object -Property CSName, FSCreationClassName, FileName
|
| FileSize# | uint64 | read | Size of the file, in bytes. 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 FileSize for each instance
# FileSize is expressed in bytes: converted to GB
Get-CimInstance -ClassName CIM_DeviceFile -Property CSName, FSCreationClassName, FileSize |
Select-Object -Property @(
'CSName'
'FSCreationClassName'
@{ Name = 'FileSizeGB'; Expression = { [math]::Round($_.FileSize / 1GB, 2) } }
)
|
| FileType# | string | read | Descriptor that represents the file type (indicated by the Extension property). Code# Abstract class: Get-CimInstance returns the instances of its subclasses
# Value of FileType for each instance
Get-CimInstance -ClassName CIM_DeviceFile -Property CSName, FSCreationClassName, FileType |
Select-Object -Property CSName, FSCreationClassName, FileType
|
| FSCreationClassName# key | string | read | Class of the file system. Code# Abstract class: Get-CimInstance returns the instances of its subclasses
# Value of FSCreationClassName for each instance
Get-CimInstance -ClassName CIM_DeviceFile -Property CSName, FSCreationClassName |
Select-Object -Property CSName, FSCreationClassName
|
| FSName# key | string | read | Code# Abstract class: Get-CimInstance returns the instances of its subclasses
# Value of FSName for each instance
Get-CimInstance -ClassName CIM_DeviceFile -Property CSName, FSCreationClassName, FSName |
Select-Object -Property CSName, FSCreationClassName, FSName
|
| Hidden# | boolean | read | If True, the file is hidden. Code# Abstract class: Get-CimInstance returns the instances of its subclasses
# Value of Hidden for each instance
Get-CimInstance -ClassName CIM_DeviceFile -Property CSName, FSCreationClassName, Hidden |
Select-Object -Property CSName, FSCreationClassName, Hidden
|
| InstallDate# | datetime | read | Date and time when the object was installed. This property does not need a value to indicate that the object is 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_DeviceFile -Property CSName, FSCreationClassName, InstallDate |
Select-Object -Property CSName, FSCreationClassName, InstallDate
|
| InUseCount# | uint64 | read | Number of "file opens" that are currently active against the file. For more information about using uint64 values in scripts, see Scripting in WMI. Code# Abstract class: Get-CimInstance returns the instances of its subclasses
# Value of InUseCount for each instance
Get-CimInstance -ClassName CIM_DeviceFile -Property CSName, FSCreationClassName, InUseCount |
Select-Object -Property CSName, FSCreationClassName, InUseCount
|
| LastAccessed# | datetime | read | Date and time that the file was last accessed. Code# Abstract class: Get-CimInstance returns the instances of its subclasses
# Value of LastAccessed for each instance
# CIM cmdlets already return a DateTime object: no conversion is needed
Get-CimInstance -ClassName CIM_DeviceFile -Property CSName, FSCreationClassName, LastAccessed |
Select-Object -Property CSName, FSCreationClassName, LastAccessed
|
| LastModified# | datetime | read | Date and time that the file was last modified. Code# Abstract class: Get-CimInstance returns the instances of its subclasses
# Value of LastModified for each instance
# CIM cmdlets already return a DateTime object: no conversion is needed
Get-CimInstance -ClassName CIM_DeviceFile -Property CSName, FSCreationClassName, LastModified |
Select-Object -Property CSName, FSCreationClassName, LastModified
|
| Name# key | string | read | Inherited name that serves as a key of a logical file instance within a file system (provide full path names). Example: "C:\Windows\system\win.ini" Code# Abstract class: Get-CimInstance returns the instances of its subclasses
# Value of Name for each instance
Get-CimInstance -ClassName CIM_DeviceFile -Property CSName, FSCreationClassName, Name |
Select-Object -Property CSName, FSCreationClassName, Name
|
| Path# | string | read | Path of the file including leading and trailing backslashes. This property is inherited from CIM_LogicalFile. Example: "\windows\system\" Code# Abstract class: Get-CimInstance returns the instances of its subclasses
# Value of Path for each instance
Get-CimInstance -ClassName CIM_DeviceFile -Property CSName, FSCreationClassName, Path |
Select-Object -Property CSName, FSCreationClassName, Path
|
| Readable# | boolean | read | If True, the file can be read. Code# Abstract class: Get-CimInstance returns the instances of its subclasses
# Value of Readable for each instance
Get-CimInstance -ClassName CIM_DeviceFile -Property CSName, FSCreationClassName, Readable |
Select-Object -Property CSName, FSCreationClassName, Readable
|
| Status# | string | read | String that indicates the current status of the object. Operational and nonoperational 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). Nonoperational 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)| Value | Label | Description |
|---|
| OK | OK | | | Error | Error | | | Degraded | Degraded | | | Unknown | Unknown | | | Pred Fail | Pred Fail | | | Starting | Starting | | | Stopping | Stopping | | | Service | Service | | | Stressed | Stressed | | | NonRecover | NonRecover | | | No Contact | No Contact | | | Lost Comm | Lost Comm | |
Code# Abstract class: Get-CimInstance returns the instances of its subclasses
# Value of Status for each instance
Get-CimInstance -ClassName CIM_DeviceFile -Property CSName, FSCreationClassName, Status |
Select-Object -Property CSName, FSCreationClassName, Status
|
| System# | boolean | read | If True, the file is a system file. Code# Abstract class: Get-CimInstance returns the instances of its subclasses
# Value of System for each instance
Get-CimInstance -ClassName CIM_DeviceFile -Property CSName, FSCreationClassName, System |
Select-Object -Property CSName, FSCreationClassName, System
|
| Writeable# | boolean | read | If True, the file can be written. Code# Abstract class: Get-CimInstance returns the instances of its subclasses
# Value of Writeable for each instance
Get-CimInstance -ClassName CIM_DeviceFile -Property CSName, FSCreationClassName, Writeable |
Select-Object -Property CSName, FSCreationClassName, Writeable
|