Returns information about port connectors installed on a computer.

This script was tested using Python 2.2.2-224 for Microsoft Windows, available from ActiveState.

Python
Edit|Remove
import win32com.client
strComputer = "."
objWMIService = win32com.client.Dispatch("WbemScripting.SWbemLocator")
objSWbemServices = objWMIService.ConnectServer(strComputer,"root\cimv2")
colItems = objSWbemServices.ExecQuery("Select * from Win32_PortConnector")
for objItem in colItems:
    print "Caption: ", objItem.Caption
    print "Connector Pinout: ", objItem.ConnectorPinout
    z = objItem.ConnectorType
    if z is None:
        a = 1
    else:
        for x in z:
            print "Connector Type: ", x
    print "Creation Class Name: ", objItem.CreationClassName
    print "Description: ", objItem.Description
    print "External Reference Designator: ", objItem.ExternalReferenceDesignator
    print "Install Date: ", objItem.InstallDate
    print "Internal Reference Designator: ", objItem.InternalReferenceDesignator
    print "Manufacturer: ", objItem.Manufacturer
    print "Model: ", objItem.Model
    print "Name: ", objItem.Name
    print "Other Identifying Info: ", objItem.OtherIdentifyingInfo
    print "Part Number: ", objItem.PartNumber
    print "Port Type: ", objItem.PortType
    print "Powered On: ", objItem.PoweredOn
    print "Serial Number: ", objItem.SerialNumber
    print "SKU: ", objItem.SKU
    print "Status: ", objItem.Status
    print "Tag: ", objItem.Tag
    print "Version: ", objItem.Version