Syntax Highlighting PowerShell Code in HTML - With a PowerShell Script
When you are publishing PowerShell code on the web, you soon discover that it looks much nicer with syntax highlighting - as did I. There are several ways to add syntax highlighting to your blog or web site, most of which rely on external (Wordpress) plugins or JavaScript on the page. I do not like that approach too much. I prefer to have the syntax highlighting embedded in the HTML code. That way I have full control over the appearance (and the highlighting also works in the RSS feed). The logical solution is to use a script that embeds HTML coloring tags directly into the script.
Scripting