Cookie
Electronic Team, Inc. uses cookies to personalize your experience on our website. By continuing to use this site, you agree to our cookie policy. Click here to learn more.

COM Port on Windows
10/11 Tools

Olga Weis Olga Weis

There are COM port tools available on Windows 10 by default, which don’t need to be installed. These are the Command Prompt and PowerShell. Both of these are command-line tools, and without third-party software, GUI tools for interaction with COM ports are very limited.

In this article, we will describe some basic port configuration and input/output commands for both PowerShell and CMD. Additionally, you can learn about Virtual Serial Port Driver - an easy-to-use solution that can help you create various types of connections between serial hardware and software.

Virtual COM Port Driver
14-day free trial

Command Prompt (CMD)

The Command Prompt is a simple terminal with a DOS-like interface. It provides a range of simple commands for interaction with file systems, devices, and ports. The Command Prompt can be launched by typing “cmd” into the search box on the taskbar. If you want to access a COM port through CMD, you will need to run the mode command.

The output of ❝mode❞ in Command Prompt

When it’s ran without any arguments, mode shows all available serial ports. You can also use it to set a port up:

mode [port name] [option]=[value]

Using ❝mode❞ to change port parameters

You can then use the echo command to send text strings to one of the devices:

echo [text] > [port name]

While CMD is good for a quick test, PowerShell is recommended if you need any sort of automation. In addition, it provides a reliable way to read from a serial device, which CMD does not.

Note that you can also launch CMD on Windows 11 in Windows Terminal, by opening a new tab.

PowerShell

PowerShell is part terminal and part scripting language, able to access many system functions and variables in Windows. Even though it can be used to create complex scripts, PowerShell can also be used directly from the command line. Much like CMD, you can find it by typing “PowerShell” into the taskbar search box.

In order to access a port through PowerShell, it needs to be added as an object:

$port = new-Object System.IO.Ports.SerialPort [port name],[baud rate],[parity],[data bits],[stop bits]

Once added, it can be opened:

$port.Open()

PowerShell used to configure, open, and write to a COM port

A message can be sent to an open port with the WriteLine method:

$port.WriteLine(“test”)

Things are more complicated with ReadLine. This method reads one line at a time, meaning that you will need to loop it in order to read data continuously. In addition, if you want to output the data into a file, this will also require the use of Out-File. Both of these will need to be learned separately in order to apply them effectively.

PowerShell can also be opened on Windows 11 by opening a new tab in a Windows Terminal instance.

Virtual Serial Port Driver

Virtual Serial Port Driver is an application that allows you to connect COM port devices and software with the use of virtual ports. The ports it creates are indistinguishable from real ones, and can be configured in a variety of ways - you can emulate a null-modem connection between two virtual ports, split or join physical ones, and more.

VSPD logo

Virtual Serial Port Driver

5 Rank based on 367+ users, Reviews(367)
Download 14-day fully-functional trial period
Virtual Serial Port Driver

All of this is done through a simple graphical interface, which also provides information on port status and the amount of transferred data. The parameters of virtual ports are fully customizable, allowing them to be configured for use with a wide variety of devices and software. VSPD has a lengthy free trial, so give it a try! When it comes to commercial use, Virtual Serial Port Driver has a well-documented and versatile SDK as well.

How to Use Virtual Serial Port Driver

1
Download and run the Virtual Serial Port Driver installer.
 VSPD download page
2
Launch the application and select “Continue trial”. Choose “Pair” from the list of connection types.
 VSPD bundle selection interface
3
Select the ports that will be connected. Click “Create” to confirm.
 VSPD pair creation and settings
4
Your connection is now active and can be found either under the “All” or “Pair” categories in the list on the left.
 The pair is created

How to Reset COM Ports Windows 10

When a USB COM port adapter is used, its drivers create a virtual port and assign a port number to it. It may sometimes be necessary to reset a reserved port, to make it usable for other software.

This can be done through the Registry Editor:
1
Find Registry Editor through the search bar.
 Registry Editor in the search results of the Windows 10 search bar
2
Find the COM Name Arbiter key under
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control.
 The Registry Editor searched for the key. The value is highlighted
3
Edit the ComDB value to all zeroes.
 The ComDB edited to 32 binary zeroes

Frequently Asked Questions

You can quickly access the Device Manager in one of the following ways:
  • The search box on your toolbar. You don’t need to type in the whole thing, just enough for it to show up in the search results.
  • Using Run. Press Windows+R to open the Run window, then type in “devmgmt.msc” and confirm.
If your COM port wasn’t immediately recognized by the system, it can still be added manually, unless there is a technical problem.

  1. Open the Device Manager.
  2. Open the Action drop-down menu and select “Add legacy hardware”.
  3. Choose “Install the hardware that I manually select from a list (Advanced)”.
  4. Your port should be located in the “Ports (COM & LPT)” group.
These are some of the common reasons why a port can’t be opened:
  • You lack the necessary drivers for a USB-to-serial adapter. These adapters tend to come with a driver CD. If that is unavailable, look for the manufacturer website, which should also have driver downloads.
  • The port is being used by a service. You can see which services are reserving the port from the Device Manager, under Properties > Details. You can then search for the process that corresponds to the service and kill it.

small logo Virtual Serial Port Driver
#1 at Serial Port Software
Virtual Serial Port Driver
Create virtual COM port pairs in Windows
5 rank based on 367+ users ( Learn more )
Get a download link for your desktop
Submit your email address to get a link for quick download on your desktop and get started!
or