Meta
add tag
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.

![Screenshot 2020-04-25 at 13.51.54.png](/image?hash=2d899e7a6c897b941b5aa429061833140dccdaee4642f403dbb6c7d5f6407c8f)
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/)).

Enter question or answer id or url (and optionally further answer ids/urls from the same question) from

Separate each id/url with a space. No need to list your own answers; they will be imported automatically.