cancel
Showing results for 
Search instead for 
Did you mean: 
BScott
Community Manager Community Manager
Community Manager

We're finally back with an important community update: PowerShell code blocks are here.

It's no secret that the community text editor is tinyMCE, and out of the box it has a limited number of code block types available. But since so many of y'all use PowerShell and have been sharing snippets in the community scripts repo, we worked with our platform vendor to get that enabled. And here we are!

Please test it out to make sure it's working and let us know over the next few days if anything goes sideways. You can comment on this post or ping me.

Here's how you add a code block, since it's hidden from view until you expand the editor.

First, start a new post / topic or a reply to someone else. Then click the 3 dots above the editor to expand the toolbar.

BScott_0-1666382949875.png

Then you'll see the option to insert your code block.

BScott_1-1666383002976.png

A window will pop up. Choose your code language, then paste your snippet into the window and click "Ok" to insert it into your post. Then finish up the rest of what you were writing and click the "Post" or "Reply" button. The PowerShell linting should show up like this with line numbering and a scroll bar across the bottom for any longer lines:

BScott_2-1666383198656.png

I've tested to make sure that copy / paste works after you publish, so that others can copy the code without copying the line numbers, but also still get the lines that go off screen. It has worked so far—please let us know if you encounter problems. Happy posting!

 

 

 

You Might Like

New to the site? Take a look at these additional resources:

Community created scripts

Keep up with Product News

Read our community guidelines

Ready to join us? You can register here.