Using Green Checkmarks in Console Output

by May 22, 2015

In a previous tip you have seen that the PowerShell console supports all characters available in a TrueType font. You just need to convert the character code to the type "Char".

Here is a more advanced example that uses splatting to insert a green checkmark into your console output:

$greenCheck = @{
  Object = [Char]8730
  ForegroundColor = 'Green'
  NoNewLine = $true
  }

Write-Host "Status check... " -NoNewline
Start-Sleep -Seconds 1
Write-Host @greenCheck
Write-Host " (Done)"

So whenever you need a green checkmark, use this line:

Write-Host @greenCheck 

If the checkmark does not appear, make sure your console font is set to a TrueType font like "Consolas". You can set the console font by clicking the icon in the top left corner of the console title bar, then choose "Properties".

Twitter This Tip! ReTweet this Tip!