You may be aware of PowerShell supported Jupyter Notebooks as many in the community have posted about it over the past few years:

These are still around with a new name and features!

Polyglot Notebooks

Claudio Regio posted the announcement earlier this month on the 3rd that .NET Interactive Notebooks is now Polyglot Notebooks!

They brought support for a ton of language kernels with a bit of rebranding and improvements that benefit us. One of the biggest things to me is the ability to mix and match kernels in a single notebook. You can create a notebook using PowerShell and for documentation mix in dynamically generating a Mermaid diagram if you wanted.

If you watched the .NET Conf 2022 that occurred a few weeks ago Claudio did a great overview of using these notebooks and will give you a great starting point:

Be sure to check out the magic commands!!!

Setup

Open up VS Code on your machine and then install the Polyglot Notebooks extension (it is in preview right now). Once that starts up it will prompt you to install any missing .NET/dotnet binaries.

Magic Commands

A magic command is special scriptable shortcuts that you can use to engage the power of notebooks. A few of these were shown in Claudio’s session (see YouTube link above).

You can run #!lsmagic in a code cell within a new notebook and this will give you a list of all the current magic commands available.

image

Once you identify a given command you can use --help to get details about that command and the flags/parameters available to it.

image