To use code formatting in posts, use the </> Icon in the toolbar. If you do not see the </> icon, click the icon and select it from the dropdown.
This will create a fenced code block:
```
type or paste code here
```
Then, just paste in your code. For example:
[string] $scriptVariable = "This is a test"