Main example
List instances
# All instances of Win32_SystemEnclosure, with the main properties
Get-CimInstance -ClassName Win32_SystemEnclosure |
Select-Object -Property @(
'Tag'
'Description'
'Status'
'Manufacturer'
'Model'
'Version'
'SerialNumber'
)Examples
Filter with WQL
# WQL filter evaluated by the provider: SecurityBreach = 5 (Breach Successful)
Get-CimInstance -ClassName Win32_SystemEnclosure -Filter 'SecurityBreach = 5' |
Select-Object -Property @(
'Tag'
'Description'
'Status'
'Manufacturer'
'Model'
'Version'
'SerialNumber'
)The filter is evaluated by the WMI provider: less data is transferred than with Where-Object.
Decode numeric values
# Lookup table for SecurityBreach (values documented by Microsoft)
$securityBreachName = @{
1 = 'Other'
2 = 'Unknown'
3 = 'No Breach'
4 = 'Breach Attempted'
5 = 'Breach Successful'
}
# Lookup table for SecurityStatus (values documented by Microsoft)
$securityStatusName = @{
1 = 'Other'
2 = 'Unknown'
3 = 'None'
4 = 'External interface locked out'
5 = 'External interface enabled'
}
Get-CimInstance -ClassName Win32_SystemEnclosure |
Select-Object -Property @(
'Tag'
'Description'
'Status'
'Manufacturer'
'Model'
'Version'
'SerialNumber'
)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 Win32_SystemEnclosure |
Select-Object -Property @(
'Tag'
'Description'
'Status'
'Manufacturer'
'Model'
'Version'
'SerialNumber'
)
} 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 Win32_SystemEnclosure
$cimClass.CimClassProperties |
Select-Object -Property Name, CimType, FlagsProperties
| Name | Type | Access | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| AudibleAlarm# | boolean | read | If TRUE, the frame is equipped with an audible alarm. Code | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| BreachDescription# | string | read | Free-form string that provides more information if the SecurityBreach property indicates that a security-related event occurred. Code | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| CableManagementStrategy# | string | read | Free-form string that contains information about how the various cables are connected and bundled for the frame. With many networking, storage-related, and power cables, cable management can be a complex and challenging endeavor. This property contains information to aid in assembly and service of the frame. Code | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Caption# | string | read | Short description of the object—a one-line string. Code | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ChassisTypes# | uint16[] | read | Array of chassis types. This value comes from the Type member of the System Enclosure or Chassis structure in the SMBIOS information. Values (27)
Code | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| CreationClassName# key | string | read | Name of the first concrete class that appears in the inheritance chain that is used in the creation of an instance. When used with the other key properties of the class, this property allows all instances of this class and its subclasses to be identified uniquely. Code | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| CurrentRequiredOrProduced# | sint16 | read | Current that is required by the chassis at 120V. If power is provided by the chassis—as in the case of an uninterruptible power supply (UPS)—this property may indicate the amperage produced (as a negative number). Unit: amps at 120 volts Code | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Depth# | real32 | read | Depth of the physical package—in inches. Unit: inches Code | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Description# | string | read | Description of the object. Code | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| HeatGeneration# | uint16 | read | Amount of heat that is generated by the chassis in BTU/hour. Unit: BTU per hour Code | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Height# | real32 | read | Height of the physical package—in inches. Unit: inches Code | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| HotSwappable# | boolean | read | If TRUE, a physical package can be hot-swapped (if it is possible to replace the element with a physically different but equivalent one while the containing package has power applied to it). For example, a disk drive package that is inserted using SCA connectors is removable and can be hot-swapped. All packages that can be hot-swapped are inherently removable and replaceable. Code | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| InstallDate# | datetime | read | Date and time the object was installed. This property does not require a value to indicate that the object is installed. Code | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| LockPresent# | boolean | read | If TRUE, the frame is protected with a lock. Code | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Manufacturer# | string | read | Name of the organization that produces the physical element. This value comes from the Manufacturer member of the System Enclosure or Chassis structure in the SMBIOS information. Code | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Model# | string | read | Name by which the physical element is known. Code | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Name# | string | read | Label by which the object is known. When subclassed, the property can be overridden to be a key property. Code | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| NumberOfPowerCords# | uint16 | read | Number of power cords that must be connected to the chassis for all of the components to operate. Code | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| OtherIdentifyingInfo# | string | read | Additional data, beyond asset tag information, that can be used to identify a physical element. One example is bar code data that is associated with an element that also has an asset tag. Be aware that if only bar code data is available and is unique or able to be used as an element key, this property would be NULL and the bar code data used as the class key, in the tag property. Code | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| PartNumber# | string | read | Part number that is assigned by the organization that produces or manufacturing the physical element. Code | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| PoweredOn# | boolean | read | If TRUE, the physical element is powered ON. Code | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Removable# | boolean | read | If TRUE, a physical package is removable (if it is designed to be taken in and out of the physical container in which it is normally found, without impairing the function of the overall packaging). A package can still be removable if the power must be "OFF" to perform the removal. If the package can be removed while the power is ON, then the element is removable and can be hot-swapped. For example, an extra battery in a laptop is removable, as is a disk drive package that is inserted using Server Configuration Application (SCA) connectors. However, the latter can be hot-swapped. A laptop display is not removable, nor is a nonredundant power supply. Removing these components would affect the function of the overall packaging or is impossible because of the tight integration of the package. Code | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Replaceable# | boolean | read | If TRUE, this physical media component can be replaced with a physically different one. For example, some computer systems allow the main processor chip to be upgraded to one of a higher clock rating. In this case, the processor is said to be replaceable. Another example is a power supply package mounted on sliding rails. All removable packages are inherently replaceable. Code | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| SecurityBreach# | uint16 | read | Status of a physical breach of the frame. Values (5)
Code | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| SecurityStatus# | uint16 | read | Security setting for external input, for example, a keyboard, to a computer. This value comes from the Security Status member of the System Enclosure or Chassis structure in the SMBIOS information. Values (5)
Code | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| SerialNumber# | string | read | Manufacturer-allocated number used to identify the physical element. This value comes from the Serial Number member of the System Enclosure or Chassis structure in the SMBIOS information. Code | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ServiceDescriptions# | string[] | read | Array of more detailed explanations for any of the entries in the ServicePhilosophy array. Be aware that each entry of this array is related to the entry in ServicePhilosophy that is located at the same index. Code | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ServicePhilosophy# | uint16[] | read | Array that includes whether the frame is serviced from the top, front, back, or side, whether the frame has sliding trays or removable sides, and whether the frame is moveable—for example, having rollers. Values (9)
Code | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| SKU# | string | read | Stock keeping unit number for the physical element. Code | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| SMBIOSAssetTag# | string | read | Asset tag number of the system enclosure. This value comes from the Asset Tag Number member of the System Enclosure or Chassis structure in the SMBIOS information. Code | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Status# | string | read | Current status of the object. Various operational and nonoperational statuses can be defined. Operational statuses include: "OK", "Degraded", and "Pred Fail" (an element, such as a SMART-enabled hard disk drive, may be functioning properly but predicting a failure in the near future). Nonoperational statuses include: "Error", "Starting", "Stopping", and "Service". The latter, "Service", could apply during mirror-resilvering of a disk, reload of a user permissions list, or other administrative work. Not all such work is online, yet the managed element is neither "OK" nor in one of the other states. Values include the following: Values (12)
Code | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Tag# key | string | read | Unique identifier of the system enclosure. Example: "System Enclosure 1" Code | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| TypeDescriptions# | string[] | read | Array of more information about the ChassisTypes array entries. Be aware that each entry of this array is related to the entry in ChassisTypes that is located at the same index. Code | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Version# | string | read | Version of the physical element. This value comes from the Version member of the System Enclosure or Chassis structure in the SMBIOS information. Code | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| VisibleAlarm# | boolean | read | If TRUE, the equipment includes a visible alarm. Code | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Weight# | real32 | read | Weight of the physical package in pounds. Unit: pounds Code | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Width# | real32 | read | Width of the physical package in inches. Unit: inches Code |
Remarks
The Win32_SystemEnclosure class is derived from CIM_Chassis.
Inheritance
Superclass chain
- CIM_ManagedSystemElement
- CIM_PhysicalElement
- CIM_PhysicalPackage
- CIM_PhysicalFrame
- CIM_Chassis
- Win32_SystemEnclosure
Known subclasses
No known subclass.
Requirements
- Namespace
- root/cimv2
- Minimum client
- Windows Vista
- Minimum server
- Windows Server 2008
- Provider
- CIMWin32
- MOF file
- CIMWin32.mof
- DLL
- CIMWin32.dll
Class qualifiers
Dynamic Provider("CIMWin32") UUID("{FAF76B94-798C-11D2-AAD1-006008C78BC7}") AMENDMENT
Microsoft source
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.