Embedding the GitHub Gist does not work here because your browser does not support JavaScript or JavaScript has been disabled. Here is the link to SerialPortReader.ps1 source code on GitHub Gist.