CIM_PhysicalMedia

CIM Physical Media
root/cimv2abstract

The CIM_PhysicalMedia class represents types of documentation and storage medium, such as tapes, CD ROMs, and so on.

On this page

Main example

List instances

# Abstract class: Get-CimInstance returns the instances of its subclasses
Get-CimInstance -ClassName CIM_PhysicalMedia |
    Select-Object -Property @(
        'Tag'
        'Description'
        'Status'
        'Manufacturer'
        'Model'
        'Version'
        'SerialNumber'
    )

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_PhysicalMedia |
        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 CIM_PhysicalMedia
$cimClass.CimClassProperties |
    Select-Object -Property Name, CimType, Flags

Properties

23 of 23 properties
NameTypeAccessDescription
Capacityuint64read

Number of bytes that can be read from, or written to, a media. This property is not applicable to hard copy (documentation) or cleaner media. Data compression should not be assumed, as it would increase the value in this property. For tapes, it should be assumed that no file marks or blank space areas are recorded on the media.

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 Capacity for each instance
# Capacity is expressed in bytes: converted to GB
Get-CimInstance -ClassName CIM_PhysicalMedia -Property Tag, Capacity |
    Select-Object -Property @(
        'Tag'
        @{ Name = 'CapacityGB'; Expression = { [math]::Round($_.Capacity / 1GB, 2) } }
    )
Captionstringread

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_PhysicalMedia -Property Tag, Caption |
    Select-Object -Property Tag, Caption
CleanerMediabooleanread

If TRUE, the physical media is used for cleaning purposes, not data storage.

Code
# Abstract class: Get-CimInstance returns the instances of its subclasses
# Value of CleanerMedia for each instance
Get-CimInstance -ClassName CIM_PhysicalMedia -Property Tag, CleanerMedia |
    Select-Object -Property Tag, CleanerMedia
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_PhysicalMedia -Property Tag, CreationClassName |
    Select-Object -Property Tag, CreationClassName
Descriptionstringread

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_PhysicalMedia -Property Tag, Description |
    Select-Object -Property Tag, Description
HotSwappablebooleanread

If TRUE, the package can be hot-swapped. A physical package can be hot-swapped if the element can be replaced by a physically different (but equivalent) one while the containing package is turned on. For example, a fan component may be designed to be hot-swapped. All components that can be hot-swapped are inherently removable and replaceable.

Code
# Abstract class: Get-CimInstance returns the instances of its subclasses
# Value of HotSwappable for each instance
Get-CimInstance -ClassName CIM_PhysicalMedia -Property Tag, HotSwappable |
    Select-Object -Property Tag, HotSwappable
InstallDatedatetimeread

Date and time 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_PhysicalMedia -Property Tag, InstallDate |
    Select-Object -Property Tag, InstallDate
Manufacturerstringread

Name of the organization responsible for producing the physical element. For more information, see the Vendor property of CIM_Product.

Code
# Abstract class: Get-CimInstance returns the instances of its subclasses
# Value of Manufacturer for each instance
Get-CimInstance -ClassName CIM_PhysicalMedia -Property Tag, Manufacturer |
    Select-Object -Property Tag, Manufacturer
MediaDescriptionstringread

Additional detail related to the MediaType enumeration. For example, if value 3 ("QIC Cartridge") is specified, this property would indicate whether the tape is wide or 1/4 inch, pre-formatted, Travan compatible, and so on.

Code
# Abstract class: Get-CimInstance returns the instances of its subclasses
# Value of MediaDescription for each instance
Get-CimInstance -ClassName CIM_PhysicalMedia -Property Tag, MediaDescription |
    Select-Object -Property Tag, MediaDescription
MediaTypeuint16read

Type of physical media. The MediaDescription property provides more explicit definition of the media type.

Values (67)
ValueLabelDescription
0Unknown
1Other
2Tape Cartridge
3QIC Cartridge
4AIT Cartridge
5DTF Cartridge
6DAT Cartridge
78mm Tape Cartridge
819mm Tape Cartridge
9DLT Cartridge
10Half-Inch Magnetic Tape Cartridge
11Cartridge Disk
12JAZ Disk
13ZIP Disk
14SyQuest Disk
15Winchester Removable Disk
16CD-ROM
17CD-ROM/XA
18CD-I
19CD Recordable
20WORM
21Magneto-Optical
22DVD
23DVD+RW
24DVD-RAM
25DVD-ROM
26DVD-Video
27Divx
28Floppy/DisketteFloppy disk
29Hard Disk
30Memory Card
31Hard Copy
32Clik Disk
33CD-RW
34CD-DA
35CD+
36DVD Recordable
37DVD-RW
38DVD-Audio
39DVD-5
40DVD-9
41DVD-10
42DVD-18
43Magneto-Optical Rewriteable
44Magneto-Optical Write Once
45Magneto-Optical Rewriteable (LIMDOW)
46Phase Change Write Once
47Phase Change Rewriteable
48Phase Change Dual Rewriteable
49Ablative Write Once
50Near Field Recording
51MiniQic
52Travan
538mm Metal Particle
548mm Advanced Metal Evaporate
55NCTP
56LTO Ultrium
57LTO Accelis
589 Track Tape9-track tape
5918 Track Tape18-track tape
6036 Track Tape36-track tape
61Magstar 3590
62Magstar MP
63D2 Tape
64Tape - DST SmallTape DST small
65Tape - DST MediumTape DST medium
66Tape - DST LargeTape DST large
Code
# Abstract class: Get-CimInstance returns the instances of its subclasses
# Value of MediaType for each instance
Get-CimInstance -ClassName CIM_PhysicalMedia -Property Tag, MediaType |
    Select-Object -Property Tag, MediaType
Modelstringread

Name by which the physical element is generally known.

Code
# Abstract class: Get-CimInstance returns the instances of its subclasses
# Value of Model for each instance
Get-CimInstance -ClassName CIM_PhysicalMedia -Property Tag, Model |
    Select-Object -Property Tag, Model
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_PhysicalMedia -Property Tag, Name |
    Select-Object -Property Tag, Name
OtherIdentifyingInfostringread

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, which also has an asset tag. Note that if only bar-code data is available, and is unique and able to be used as an element key, this property would be null and the bar-code data would be used as the class key in the Tag property. This property is inherited from CIM_PhysicalElement.

Code
# Abstract class: Get-CimInstance returns the instances of its subclasses
# Value of OtherIdentifyingInfo for each instance
Get-CimInstance -ClassName CIM_PhysicalMedia -Property Tag, OtherIdentifyingInfo |
    Select-Object -Property Tag, OtherIdentifyingInfo
PartNumberstringread

Part number assigned by the organization responsible for producing or manufacturing the physical element.

Code
# Abstract class: Get-CimInstance returns the instances of its subclasses
# Value of PartNumber for each instance
Get-CimInstance -ClassName CIM_PhysicalMedia -Property Tag, PartNumber |
    Select-Object -Property Tag, PartNumber
PoweredOnbooleanread

If TRUE, the physical element is powered on.

Code
# Abstract class: Get-CimInstance returns the instances of its subclasses
# Value of PoweredOn for each instance
Get-CimInstance -ClassName CIM_PhysicalMedia -Property Tag, PoweredOn |
    Select-Object -Property Tag, PoweredOn
Removablebooleanread

If TRUE, this element 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 is considered removable even if the power must be off to perform the removal. If the power can be on and the package removed, then the element is removable and can be hot-swapped. For example, an ungradable processor chip is removable.

Code
# Abstract class: Get-CimInstance returns the instances of its subclasses
# Value of Removable for each instance
Get-CimInstance -ClassName CIM_PhysicalMedia -Property Tag, Removable |
    Select-Object -Property Tag, Removable
Replaceablebooleanread

If TRUE, it is possible to replace the element 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. All removable components are inherently replaceable.

Code
# Abstract class: Get-CimInstance returns the instances of its subclasses
# Value of Replaceable for each instance
Get-CimInstance -ClassName CIM_PhysicalMedia -Property Tag, Replaceable |
    Select-Object -Property Tag, Replaceable
SerialNumberstringread

Manufacturer-allocated number used to identify the physical element.

Code
# Abstract class: Get-CimInstance returns the instances of its subclasses
# Value of SerialNumber for each instance
Get-CimInstance -ClassName CIM_PhysicalMedia -Property Tag, SerialNumber |
    Select-Object -Property Tag, SerialNumber
SKUstringread

Stock-keeping unit number for the physical element.

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

Current status of the object.

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_PhysicalMedia -Property Tag, Status |
    Select-Object -Property Tag, Status
Tag keystringread

Arbitrary string that uniquely identifies the physical element and serves as the element's key. This property can contain information, such as asset tag or serial number data. The key for CIM_PhysicalElement is placed very high in the object hierarchy to independently identify the hardware or entity, regardless of physical placement in (or on) cabinets, adapters, and so on. For example, a removable component that can be hot-swapped can be taken from its containing (scoping) package and be temporarily unused. The object still continues to exist and can even be inserted into a different scoping container. The key for a physical element is an arbitrary string that is defined independently of placement or location-oriented hierarchy.

Code
# Abstract class: Get-CimInstance returns the instances of its subclasses
# Value of Tag for each instance
Get-CimInstance -ClassName CIM_PhysicalMedia -Property Tag |
    Select-Object -Property Tag
Versionstringread

Version of the physical element.

Code
# Abstract class: Get-CimInstance returns the instances of its subclasses
# Value of Version for each instance
Get-CimInstance -ClassName CIM_PhysicalMedia -Property Tag, Version |
    Select-Object -Property Tag, Version
WriteProtectOnbooleanread

If TRUE, the media is currently write-protected by a physical mechanism, such as a protect tab on a floppy disk.

Code
# Abstract class: Get-CimInstance returns the instances of its subclasses
# Value of WriteProtectOn for each instance
Get-CimInstance -ClassName CIM_PhysicalMedia -Property Tag, WriteProtectOn |
    Select-Object -Property Tag, WriteProtectOn

Remarks

The CIM_PhysicalMedia class is derived from CIM_PhysicalComponent.

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_PhysicalElement
  3. CIM_PhysicalComponent
  4. CIM_PhysicalMedia

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("{FAF76B7D-798C-11D2-AAD1-006008C78BC7}") 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.