Returns information about all the I/O ports found on a computer.

This script was tested using Object REXX 2.1.0 for Microsoft Windows, available from IBM.

Object REXX
Edit|Remove
strComputer = "."
objWMIService = .OLEObject~GetObject("winmgmts:\\"||strComputer||"\root\CIMV2")
do objItem over objWMIService~ExecQuery("Select * from Win32_PortResource")
    say "Alias:" objItem~Alias
    say "Caption:" objItem~Caption
    say "Creation Class Name:" objItem~CreationClassName
    say "CS Creation Class Name:" objItem~CSCreationClassName
    say "CS Name:" objItem~CSName
    say "Description:" objItem~Description
    say "Ending Address:" objItem~EndingAddress
    say "Install Date:" objItem~InstallDate
    say "Name:" objItem~Name
    say "Starting Address:" objItem~StartingAddress
    say "Status:" objItem~Status
end