{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "[this doc on github](https://github.com/dotnet/interactive/tree/master/samples/notebooks/powershell)\n", "\n", "# Interact with Azure Cloud Shell from PowerShell notebook" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Magic of the `Enter-AzShell` cmdlet" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The `Enter-AzShell` cmdlet is a new addition to the `Microsoft.DotNet.Interactive.PowerShell` module.\n", "Running it will authenticate you to Azure and establish a PowerShell cloud shell session for you.\n", "After that, all subsequent code submitted from the cells are executed in that cloud shell session.\n", "\n", "When you are done with the cloud shell, just type and run `exit` from a cell to end the session, and after that, all subsequent code submitted from the cells will again be executed using the local PowerShell kernel.\n", "\n", "Let's get started with some examples!" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "First, let's list the available cmdlets from the `Microsoft.DotNet.Interactive.PowerShell`." ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "scrolled": true }, "outputs": [ { "data": { "text/html": [ "\n", "