I was just pulling my hair out trying to figure out why I can't communicate with the Arduino through Windows Powershell (which relies on .NET components). Hopefully this will help others. The final code is:

Most interesting. How is the input to the pc serial port from the arduino displayed by powershell? I use batch files to send strings to the com port, but cmd.exe doesn't have the capability to read he serial port input buffer.

Google forum search: Use Google Search box in upper right side of this page. Why I like my 2005 Rio Yellow Honda S2000 https://www.youtube.com/watch?v=pWjMvrkUqX0

Thanks Zoomkat. I would have used my usual way of doing things through cmd, vbscript in windows scripting host, but there are issues with calling the comm ocx. Powershell uses the latest .NET objects so is very powerful once you get the hang of it. I also recommend making sure you have version 2.0 of Powershell. Anyway, because Powershell (which is now Microsoft's official scripting platform) uses .NET objects you have as much power as you would programming a C# application. That's what got me through the hours of pulling my hair out with Powershell. It is not like DOS or VBSCRIPT commands at all. More like Ruby. It did hurt my head.