Writing and Reading info from Serial Ports
PSMDTAG:FAQ: How do I read/write data from a Serial Port?
Writing to a Serial Port
PS> [System.IO.Ports.SerialPort]::getportnames()
COM3
PS> $port= new-Object System.IO.Ports.SerialPort COM3,9600,None,8,one
PS> $port.open()
PS> $port.Write("Hello world")
PS> $port.Close()
Reading from a Serial Port
PS> $port= new-Object System.IO.Ports.SerialPort COM3,9600,None,8,one
PS> $port.add_DataReceived({`$this is a handle to SerialPort. $_ is a pointer to SerialDataRecievedEventArgs})
PS> $port.Open()
Enjoy!
Jeffrey Snover [MSFT]
Windows PowerShell/Aspen Architect
Visit the Windows PowerShell Team blog at: http://blogs.msdn.com/PowerShell
Visit the Windows PowerShell ScriptCenter at: http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx
PSMDTAG:DOTNET: SerialPort