After moving my blog to a new hosting provider last month I was reviewing the WordPress plugins I use and I found myself wondering if Alex Gorbatchev’s SyntaxHighlighter supported PowerCLI. The WordPress plugin I use (courtesy of Alex Bond) had a Powershell plugin but no PowerCLI. Time to create! I’m by no means the first person to extend this plugin and I quickly realised there were two options;
- upload a new ‘brush’ file to overwrite the existing Powershell brush. That change would be lost however if you upgraded the WordPress plugin and with the imminent release of Powershell v3 it could also be lost if the original Powershell brush was updated.
- write an extra plugin which includes the new language. I felt this was a bit more work, but generally the better solution (plus I was half doing this to learn more about WordPress and the plugin structure). With clear guidance on how to create new languages the hard work was already done.
The result is my WordPress plugin for PowerCLI syntax highlighting which includes;
- PowerCLI cmdlets up to v5.01 (including AutoDeploy, ImageBuilder, vCD etc)
- VMware Update Manager cmdlets
- The vSphere PowerCLI Reference book cmdlets.
Continue reading Adding a custom PowerCLI brush for syntax highlighting on WordPress