PowerShell and COM Ports - TechRepublic
Question
March 3, 2011 at 05:14 AM
mark@summa

PowerShell and COM Ports

by mark@summa . Updated 15 years, 4 months ago

Does anyone know if there is a way using PowerShell to send/receive data through a COM Port? I’m trying to communicate with an old piece of equipment that is only accessible through an RS-232 port using async send/receive messages.

So the basic syntax of what would be needed would be to..
open the com port
send message
receive message into a variable
parse message
based on received message, make decision send new message, and wait for response that will go into a variable.
repeat…

(Note – I realize the above is extremely simplified, just looking for a heads-up on if PowerShell is capable of doing something like this and if so a few tips on where to get started).

Thank you!!

This discussion is locked

All Comments