# Monday, July 13, 2020

Episode 617

Kayla Cinnamon on Windows Terminal

Windows Terminal, which just released version 1.0 provides a single interface for almost any command-line system. PM Kayla Cinnamon discusses the existing features and what is coming in this tool.


Monday, July 13, 2020 9:58:00 AM (GMT Daylight Time, UTC+01:00)
# Wednesday, June 3, 2020

When working with Git, I find myself frequently typing “git status” - a useful command that shows me on which branch I am working and the number of uncommitted files that have been changed, added, and deleted. An example is shown in Fig. 1:

Fig. 1

As you can see, I am working on the "dgiard/posh-git-demo" branch, I have added 1 file, deleted 1 file, and changed 1 file since my last commit.

But what if I could always see this information? What if was appended to the command line, so I never had to type "git status"?

The posh-git tool provides exactly this functionality.

To install posh-git, run Windows PowerShell as an administrator.

At the PowerShell command prompt, enter  

PowerShellGet\Install-Module posh-git

and press "Y" when prompted for confirmation.

Then, enter the command 

import-module posh-git

Your command prompt will change to something like the one shown in Fig. 2.

Fig. 2

Notice the text in square brackets after the path. It lists the current branch no which I am working, followed by the number of files I have added, changed, or deleted (if any) since my last commit. The red text, indicates these changes not been added to my git rep repository. If I issue a "git add", the text will change to green to indicate they are ready to commit, as shown in Fig. 3.

Fig. 3

After I commit the files, I only see my current branch and no uncommitted files, as shown in Fig. 4.

Fig. 4

Of course, I can get more details by typing "git status"; but most of the time, this is all the information I need.

Thank you to Hattan for showing me this tool.

Wednesday, June 3, 2020 3:31:00 PM (GMT Daylight Time, UTC+01:00)
# Sunday, January 7, 2018

Azure provides several ways of managing resources through scripting users. You can write scripts in either PowerShell (a popular Windows tool for managing servers and IAT resources) or CLI (a Bash-like scripting language that runs on Windows, Linux, and MacOS).

To use these tools, you need to have them installed locally, along with any support tools, such as the Azure PowerShell commandlets.

Until now.

Recently, Microsoft released the Azure Cloud Shell - a browser-based command-line interface built into the Azure portal. By opening a Cloud Shell from the Azure Portal, you can execute PowerShell or CLI scripts from within your browser, without installing anything.

To open Cloud Shell, navigate to the Azure portal and click the [Cloud Shell] button (Fig. 1) on the top tool bar.

Fig. 1

It may take a minute to retrieve and connect to a Cloud Shell environment (Fig. 2), but soon you will see a window with a command prompt, as Shown in Fig. 3.

Fig. 2

Fig. 3

The Cloud Shell in the image is configured to run CLI scripts. You can tell this by the dropdown in the window's top left corner. You can also run PowerShell scripts in a Cloud Shell window. To change the script types, click the top left dropdown and select your desired scripting language, as shown in Fig. 4.

Fig. 4

Fig. 5 shows the Cloud Shell with PowerShell selected.

Fig. 5

You don't need to log into the Cloud Shell environment. It will assume the account from which it was launched.

But you can view, create, and manage Azure resources. For example, from the Bash shell, type

az group list -o table

To see a list of all Resource Groups


az group create -l southeastus -n myrg

to create a new resource group named "myrg" in the Southeast US region.

You can even do other bash commands, such as ssh into an Azure Linux VM.

Cloud Shell automatically creates a container within an Azure VM to host your session. Although this container is destroyed shortly after you disconnect, Cloud Shell also creates a storage account to persist files or settings you use when using this interface, so they will be there when you return.

Azure Cloud Shell provides an environment for you to execute automation scripts and other administrative functions.

Sunday, January 7, 2018 10:43:00 AM (GMT Standard Time, UTC+00:00)
# Monday, December 25, 2017
Monday, December 25, 2017 9:48:00 AM (GMT Standard Time, UTC+00:00)
# Monday, July 10, 2017
Monday, July 10, 2017 3:58:31 PM (GMT Daylight Time, UTC+01:00)
# Monday, December 21, 2015
Monday, December 21, 2015 7:34:56 PM (GMT Standard Time, UTC+00:00)
# Friday, July 31, 2015

Recently, Brian Lewis and I teamed up to record a session working through a set of labs teaching how to automate Microsoft Azure IAAS with PowerShell.

The first 3 videos covered labs 1 and 2.

We have now released 2 new videos that cover Lab 3. This lab synchronizes an Azure Active Directory with an on-premises Active Directory.

Click the links below to view these videos.

Part 4

Part 5

Friday, July 31, 2015 12:04:00 PM (GMT Daylight Time, UTC+01:00)
# Monday, July 20, 2015

Want to learn how to use Powershell to manage your Azure IAAS assets, such as Virtual Machines and Virtual Networks?

Brian Lewis and I are recording a series of videos that walk you through a set of Hands-On Labs. These are the same labs I used to learn how to automate Azure with Powershell and Brian is the man who taught me.

So far, we have over 2 hours of content with more to come.

Check out this 3-part series by clicking the links below.

Part 1

Part 2

Part 3

Monday, July 20, 2015 1:04:45 AM (GMT Daylight Time, UTC+01:00)