Win32_PortConnector

Win32 Port Connector
root/cimv2dynamickey : Tag

The Win32_PortConnector WMI class represents physical connection ports, such as DB-25 pin male, Centronics, or PS/2.

On this page

Main example

List instances

# All instances of Win32_PortConnector, with the main properties
Get-CimInstance -ClassName Win32_PortConnector |
    Select-Object -Property @(
        'Tag'
        'Description'
        'Status'
        'Manufacturer'
        'Model'
        'Version'
        'SerialNumber'
    )

Examples

Filter with WQL

# WQL filter evaluated by the provider: PortType = 1 (Parallel Port XT/AT Compatible)
Get-CimInstance -ClassName Win32_PortConnector -Filter 'PortType = 1' |
    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 PortType (values documented by Microsoft)
$portTypeName = @{
    0 = 'None'
    1 = 'Parallel Port XT/AT Compatible'
    2 = 'Parallel Port PS/2'
    3 = 'Parallel Port ECP'
    4 = 'Parallel Port EPP'
    5 = 'Parallel Port ECP/EPP'
    6 = 'Serial Port XT/AT Compatible'
    7 = 'Serial Port 16450 Compatible'
    8 = 'Serial Port 16550 Compatible'
    9 = 'Serial Port 16550A Compatible'
    10 = 'SCSI Port'
    11 = 'MIDI Port'
    12 = 'Joy Stick Port'
    13 = 'Keyboard Port'
    14 = 'Mouse Port'
    15 = 'SSA SCSI'
    16 = 'USB'
    17 = 'FireWire (IEEE P1394)'
    18 = 'PCMCIA Type II'
    19 = 'PCMCIA Type II'
    20 = 'PCMCIA Type III'
    21 = 'Cardbus'
    22 = 'Access Bus Port'
    23 = 'SCSI II'
    24 = 'SCSI Wide'
    25 = 'PC-98'
    26 = 'PC-98-Hireso'
    27 = 'PC-H98'
    28 = 'Video Port'
    29 = 'Audio Port'
    30 = 'Modem Port'
    31 = 'Network Port'
    32 = '8251 Compatible'
    33 = '8251 FIFO Compatible'
}

Get-CimInstance -ClassName Win32_PortConnector |
    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_PortConnector |
        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_PortConnector
$cimClass.CimClassProperties |
    Select-Object -Property Name, CimType, Flags

Properties

20 of 20 properties
NameTypeAccessDescription
Captionstringread

Short description of the object—a one-line string.

Code
# Value of Caption for each instance
Get-CimInstance -ClassName Win32_PortConnector -Property Tag, Caption |
    Select-Object -Property Tag, Caption
ConnectorPinoutstringread

Pin configuration and signal usage of a physical connector.

Code
# Value of ConnectorPinout for each instance
Get-CimInstance -ClassName Win32_PortConnector -Property Tag, ConnectorPinout |
    Select-Object -Property Tag, ConnectorPinout
ConnectorTypeuint16[]read

Array of physical attributes of the connector used by this port.

95

68 Pin Dual Inline

96

On Board Sound Connector

97

Mini-Jack

98

PCI-X

99

Sbus IEEE 1396-1993 32 Bit

100

Sbus IEEE 1396-1993 64 Bit

101

MCA

102

GIO

103

XIO

104

HIO

105

NGIO

106

PMC

107

MTRJ

108

VF-45

109

Future I/O

110

SC

111

SG

112

Electrical

113

Optical

114

Ribbon

115

GLM

116

1x9

117

Mini SG

118

LC

119

HSSC

120

VHDCI Shielded (68 pins)

121

InfiniBand

Values (95)
ValueLabelDescription
0Unknown
1Other
2Male
3Female
4Shielded
5Unshielded
6SCSI (A) High-Density (50 pins)
7SCSI (A) Low-Density (50 pins)
8SCSI (P) High-Density (68 pins)
9SCSI SCA-I (80 pins)
10SCSI SCA-II (80 pins)
11SCSI Fibre Channel (DB-9, Copper)
12SCSI Fibre Channel (Fibre)
13SCSI Fibre Channel SCA-II (40 pins)
14SCSI Fibre Channel SCA-II (20 pins)
15SCSI Fibre Channel BNC
16ATA 3-1/2 Inch (40 pins)
17ATA 2-1/2 Inch (44 pins)
18ATA-2
19ATA-3
20ATA/66
21DB-9
22DB-15
23DB-25
24DB-36
25RS-232C
26RS-422
27RS-423
28RS-485
29RS-449
30V.35
31X.21
32IEEE-488
33AUI
34UTP Category 3
35UTP Category 4
36UTP Category 5
37BNC
38RJ11
39RJ45
40Fiber MIC
41Apple AUI
42Apple GeoPort
43PCI
44ISA
45EISA
46VESA
47PCMCIA
48PCMCIA Type I
49PCMCIA Type II
50PCMCIA Type III
51ZV Port
52CardBus
53USB
54IEEE 1394
55HIPPI
56HSSDC (6 pins)
57GBIC
58DIN
59Mini-DIN
60Micro-DIN
61PS/2
62Infrared
63HP-HIL
64Access.bus
65NuBus
66Centronics
67Mini-Centronics
68Mini-Centronics Type-14
69Mini-Centronics Type-20
70Mini-Centronics Type-26
71Bus Mouse
72ADB
73AGP
74VME Bus
75VME64
76Proprietary
77Proprietary Processor Card Slot
78Proprietary Memory Card Slot
79Proprietary I/O Riser Slot
80PCI-66MHZ
81AGP2X
82AGP4X
83PC-98
84PC-98HiresoPC-98-Hireso
85PC-H98
86PC-98Note
87PC-98Full
88Mini-JackSSA SCSI
89On Board FloppyCircular
909 Pin Dual Inline (pin 10 cut)On Board IDE Connector
9125 Pin Dual Inline (pin 26 cut)On Board Floppy Connector
9250 Pin Dual Inline9 Pin Dual Inline
9368 Pin Dual Inline25 Pin Dual Inline
94On Board Sound Input from CD-ROM50 Pin Dual Inline
Code
# Value of ConnectorType for each instance
# ConnectorType is an array: -ExpandProperty returns its items one by one
Get-CimInstance -ClassName Win32_PortConnector -Property ConnectorType |
    Select-Object -ExpandProperty ConnectorType
CreationClassName keystringread

Name of the first concrete class that appears in the inheritance chain used in the creation of an instance. When used with the other key properties of the class, the property allows all instances of this class and its subclasses to be identified uniquely.

Code
# Value of CreationClassName for each instance
Get-CimInstance -ClassName Win32_PortConnector -Property Tag, CreationClassName |
    Select-Object -Property Tag, CreationClassName
Descriptionstringread

Description of the object.

Code
# Value of Description for each instance
Get-CimInstance -ClassName Win32_PortConnector -Property Tag, Description |
    Select-Object -Property Tag, Description
ExternalReferenceDesignatorstringread

External reference designator of the port. External reference designators are identifiers that determine the type and use of the port.

Example: "COM1"

Code
# Value of ExternalReferenceDesignator for each instance
Get-CimInstance -ClassName Win32_PortConnector -Property Tag, ExternalReferenceDesignator |
    Select-Object -Property Tag, ExternalReferenceDesignator
InstallDatedatetimeread

Date and time the object is installed. This property does not need a value to indicate that the object is installed.

Code
# Value of InstallDate for each instance
# CIM cmdlets already return a DateTime object: no conversion is needed
Get-CimInstance -ClassName Win32_PortConnector -Property Tag, InstallDate |
    Select-Object -Property Tag, InstallDate
InternalReferenceDesignatorstringread

Internal reference designator of the port. Internal reference designators are specific to the manufacturer, and identify the circuit board location or use of the port.

Example: "J101"

Code
# Value of InternalReferenceDesignator for each instance
Get-CimInstance -ClassName Win32_PortConnector -Property Tag, InternalReferenceDesignator |
    Select-Object -Property Tag, InternalReferenceDesignator
Manufacturerstringread

Name of the organization responsible for producing the physical element.

Code
# Value of Manufacturer for each instance
Get-CimInstance -ClassName Win32_PortConnector -Property Tag, Manufacturer |
    Select-Object -Property Tag, Manufacturer
Modelstringread

Name for the physical element.

Code
# Value of Model for each instance
Get-CimInstance -ClassName Win32_PortConnector -Property Tag, Model |
    Select-Object -Property Tag, Model
Namestringread

Label for the object. When subclassed, the property can be overridden to be a key property.

Code
# Value of Name for each instance
Get-CimInstance -ClassName Win32_PortConnector -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 associated with an element that also has an asset tag. If only bar code data is available and unique or able to be used as an element key, this property is NULL and the bar code data is used as the class key in the tag property.

Code
# Value of OtherIdentifyingInfo for each instance
Get-CimInstance -ClassName Win32_PortConnector -Property Tag, OtherIdentifyingInfo |
    Select-Object -Property Tag, OtherIdentifyingInfo
PartNumberstringread

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

Code
# Value of PartNumber for each instance
Get-CimInstance -ClassName Win32_PortConnector -Property Tag, PartNumber |
    Select-Object -Property Tag, PartNumber
PortTypeuint16read

Function of the port. The following list lists the values.

Values (34)
ValueLabelDescription
0None
1Parallel Port XT/AT Compatible
2Parallel Port PS/2
3Parallel Port ECP
4Parallel Port EPP
5Parallel Port ECP/EPP
6Serial Port XT/AT Compatible
7Serial Port 16450 Compatible
8Serial Port 16550 Compatible
9Serial Port 16550A Compatible
10SCSI Port
11MIDI Port
12Joy Stick Port
13Keyboard Port
14Mouse Port
15SSA SCSI
16USB
17FireWire (IEEE P1394)
18PCMCIA Type II
19PCMCIA Type II
20PCMCIA Type III
21Cardbus
22Access Bus Port
23SCSI II
24SCSI Wide
25PC-98
26PC-98-Hireso
27PC-H98
28Video Port
29Audio Port
30Modem Port
31Network Port
328251 Compatible
338251 FIFO Compatible
Code
# Value of PortType for each instance
# Lookup table for PortType (values documented by Microsoft)
$portTypeName = @{
    0 = 'None'
    1 = 'Parallel Port XT/AT Compatible'
    2 = 'Parallel Port PS/2'
    3 = 'Parallel Port ECP'
    4 = 'Parallel Port EPP'
    5 = 'Parallel Port ECP/EPP'
    6 = 'Serial Port XT/AT Compatible'
    7 = 'Serial Port 16450 Compatible'
    8 = 'Serial Port 16550 Compatible'
    9 = 'Serial Port 16550A Compatible'
    10 = 'SCSI Port'
    11 = 'MIDI Port'
    12 = 'Joy Stick Port'
    13 = 'Keyboard Port'
    14 = 'Mouse Port'
    15 = 'SSA SCSI'
    16 = 'USB'
    17 = 'FireWire (IEEE P1394)'
    18 = 'PCMCIA Type II'
    19 = 'PCMCIA Type II'
    20 = 'PCMCIA Type III'
    21 = 'Cardbus'
    22 = 'Access Bus Port'
    23 = 'SCSI II'
    24 = 'SCSI Wide'
    25 = 'PC-98'
    26 = 'PC-98-Hireso'
    27 = 'PC-H98'
    28 = 'Video Port'
    29 = 'Audio Port'
    30 = 'Modem Port'
    31 = 'Network Port'
    32 = '8251 Compatible'
    33 = '8251 FIFO Compatible'
}
Get-CimInstance -ClassName Win32_PortConnector -Property Tag, PortType |
    Select-Object -Property @(
        'Tag'
        @{ Name = 'PortType'; Expression = { $portTypeName[[int]$_.PortType] } }
    )
PoweredOnbooleanread

If TRUE, the physical element is powered on.

Code
# Value of PoweredOn for each instance
Get-CimInstance -ClassName Win32_PortConnector -Property Tag, PoweredOn |
    Select-Object -Property Tag, PoweredOn
SerialNumberstringread

Manufacturer-allocated number used to identify a physical element.

Code
# Value of SerialNumber for each instance
Get-CimInstance -ClassName Win32_PortConnector -Property Tag, SerialNumber |
    Select-Object -Property Tag, SerialNumber
SKUstringread

Stock keeping unit number for a physical element.

Code
# Value of SKU for each instance
Get-CimInstance -ClassName Win32_PortConnector -Property Tag, SKU |
    Select-Object -Property Tag, SKU
Statusstringread

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)
ValueLabelDescription
OKOK
ErrorError
DegradedDegraded
UnknownUnknown
Pred FailPred Fail
StartingStarting
StoppingStopping
ServiceService
StressedStressed
NonRecoverNonRecover
No ContactNo Contact
Lost CommLost Comm
Code
# Value of Status for each instance
Get-CimInstance -ClassName Win32_PortConnector -Property Tag, Status |
    Select-Object -Property Tag, Status
Tag keystringread

Unique identifier of a port connection on the computer system.

Example: "Port Connector 1"

Code
# Value of Tag for each instance
Get-CimInstance -ClassName Win32_PortConnector -Property Tag |
    Select-Object -Property Tag
Versionstringread

Version of the physical element.

Code
# Value of Version for each instance
Get-CimInstance -ClassName Win32_PortConnector -Property Tag, Version |
    Select-Object -Property Tag, Version

Remarks

The Win32_PortConnector class is derived from CIM_PhysicalConnector.

Inheritance

Superclass chain

  1. CIM_ManagedSystemElement
  2. CIM_PhysicalElement
  3. CIM_PhysicalConnector
  4. Win32_PortConnector

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("{FAF76B92-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.