Elevate your documentation with PowerShell Jupyter Notebook

Today I presented a Microsoft Reactor session on How to Elevate your documentation with PowerShell Jupyter Notebook. This session provided;

  • an introduction to ‘What is Jupyter Notebook”
  • a quick start guide
  • some advanced examples showing mixed HTML, JavaScript and PowerShell Notebook and Charts / Graphs
  • how to create your own PowerShell Jupyter Notebook environments

For those that attended the session, the presentation is embedded at the end of this post.

Other links from the How to Elevate your documentation with PowerShell Jupyter Notebook session;

I’ve also uploaded to GitHub GIST and embedded below my example notebooks shown during the presentation demos.

The YouTube recording of the presentation is now available here.

Graph Recent Azure AD SignIns

The following example notebook (below the graph output images) showed how to get the most recent 1000 Azure AD SignIns from a small Azure AD Tenant, summarize them by day and graph them.

A Bar Graph example from an Azure AD SignIns PowerShell Jupyter Notebook example.

Get AzureAD SignIns and Graph on a Bar Chart

A Scatter Graph example from an Azure AD SignIns PowerShell Jupyter Notebook example.

Get AzureAD SignIns and Graph on a Scatter Chart

Graphing Azure AD SignIns – PowerShell Jupyter Notebook

GIST

Getting Creative with PowerShell and Jupyter Notebook

The following example notebook (below the output screenshot images) shows some creative possibilities using PowerShell that may assist for interesting and engaging documentation.

Get an Image from a URL and Display it using Markdown

Get an image and display it using Markdown

Get an Image from a URL and Display it using HTML

A variation on the example above. Get an image using a WebRequest and convert the image to Base64, enclose it in HTML Image tags and display using HTML.

Get an image and display it using HTML

Font Awesome and Emoji’s

Documentation is always better with Font Awesome and Emoji’s. This example shows how to retrieve and embed Font Awesome  icons and Emoji’s in a PowerShell Jupyter Notebook.

Display Font Awesome and Emojis in PowerShell Jupyter Notebook

Coloured Output

In this example I show how to generate a Mandelbrot with PowerShell to show that colored output makes for interesting eye catching content.

Generating a Mandelbrot with Powershell and displaying in a PowerShell Jupyter Notebook

ASCII Art

There’s a time and place for everything and you could argue that ASCII Art has had its time. But it’s still an option when everything old is new again.

Generating a ASCII Art with Powershell and displaying in a PowerShell Jupyter Notebook

Formatting PowerShell Tables as HTML Tables

The last example shows getting data using PowerShell and converting it to HTML with a simple stylesheet to make it prettier and the displaying it in the Jupyter Notebook using HTML and an iFrame.

Generating HTML Formatted Tables for output with Powershell and displaying in a PowerShell Jupyter Notebook

Creative Documentation Examples – PowerShell Jupyter Notebook

GIST

Presentation

Here is the PowerPoint Presentation that incorporated the content above.