PeterVandivier
It appears there is not a keyword to pin PowerShell language linting in code blocks. I believe `powershell` is the preferred convention, but I've also used `pwsh`, `ps`, and `ps1` in the past. Currently all these tags leave the code-block un-linted.
```powershell
function Get-Foo {
[CmdletBinding()]Param(
$MyFoo
)
[PSCustomObject]@{
Bar = $MyFoo
}
}
```
renders as...
```powershell
function Get-Foo {
[CmdletBinding()]Param(
$MyFoo
)
[PSCustomObject]@{
Bar = $MyFoo
}
}
```
I'm using `sh` at present to get a little bit of colour, but it would be nice to have the proper tag supported for proper linting.

Top Answer
Jack Douglas
update May 2020: see this Meta post a subsequent change to the highlighting engine:
@@@ question 988
---
We needed to serve up a version of highlight.js with PowerShell support — this is now done and your example should have highlighting (unless your monospace font is set to 'Source Code Pro' and you are on Firefox, see [here on Bugzilla](https://bugzilla.mozilla.org/show_bug.cgi?id=1520157)).
We are just using the default 'style' (theme) for highlight.js — the syntax highlighting you posted in your screen grab is probably most like the 'Vs' style (you can take a look on [the demo page](https://highlightjs.org/static/demo/)).