Wednesday, June 2, 2010

Syntax Highlighting Feature

I'm running this blog for 1,5 years now, and I thought it was time to add a little bling feature.

$message = "So, for better readability,"

Dim strMessage="from now on all my code examples..."

are presented with syntax highlighting"
    Cool features
  • syntax highlighing for a lot of different code types: see here

  • code view

  • code copy

  • code printing

See SyntaxHighlighter for more information.

Powershell Example:
# SCOM Shell Script
#Returns all User Roles matching given DisplayName and show the User Role members
Get-UserRole | Where {$_.DisplayName -match "Operator Team X"} | Sort-Object DisplayName | foreach { Write-Host "Role:" $_.DisplayName ; $_.Users | foreach { Write-Host " $_"}}

To view all code items use #Code label.

0 reacties:

Post a Comment