how to view the list of COM ports in Windows

What is the dos command to list the COM ports which are working.
Who is Participating?
Steve KnightConnect With a Mentor IT ConsultancyCommented:
The mode command should show the COM ports, from a cmd.exe prompt:



mode | find "COM"
Frank McCourryV.P. Holland Computers, Inc.Commented:
Pradeep DubeyConsultantCommented:
use netstat -ao

it will give you Active Connections along with the below things:

  Proto  Local Address          Foreign Address        State           PID
Bill PrewCommented:
You can also use WMIC command to get a bit more info, and it can be formated in different ways that make it easier to parse in a BAT script using FOR processing.  Give the a try:

wmic path Win32_SerialPort get /format:list

Steve KnightIT ConsultancyCommented:
Thankyou for your kind feedback at answering your question and the reward of a B grade answer.

next time please dont bother expecting an answer unless you can be bothered to take part.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.