Starting IaaS Workloads with SHiPs in Azure PowerShell

1 hour
  • 3 Learning Objectives

About this Hands-on Lab

Simple Hierarchy in PowerShell (SHiPs) is used in Azure to change directory into your cloud resources, much like you would change directory in a filesystem. This is useful for accounts that have many subscriptions and resource groups. In this hands-on lab, you will create a new Azure VM after changing directory into your resource group. Because the context is assumed in Cloud Shell, you don’t have to specify the resource group or subscription in order to create a VM in that location.

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Log in to the Azure Portal and Open Cloud Shell
  1. Navigate to
  2. Use the email and password provided with this hands-on lab to log in to the Azure Portal.
  3. Click the Cloud Shell icon (>_) in top menu bar.
  4. Select PowerShell.
  5. Click Show advanced settings.
  6. Create a new storage account with a globally unique name.
  7. Create a file share named "fileshare".
  8. Click Create Storage.
From the Azure Drive, Change Directory into the Resource Group
  1. Set the directory location:

    Set-Location azure:
  2. Show the PSProvider:

  3. Output the name of the subscription:

  4. Change directory into the subscription:

    cd './P  [hit the TAB key to autocomplete]'
  5. Change directory into resource groups:

    cd ./ResourceGroups/
  6. List the resource groups:

  7. Change to the resource group by typing cd ./ and hitting Tab to autocomplete the name.

  8. List its contents:

Create a New Azure VM
  1. From within the current directory, enter the following command to create a new Azure VM:

    New-AzVM -Name 'myvm123' -Location 'westus' -VirtualNetworkName '<VIRTUAL_NETWORK_PROVIDED_WITH_LAB>' -SubnetName 'default' -SecurityGroupName '<NSG_PROVIDED_WITH_LAB>' -PublicIpAddressName 'myvm123pubip' -OpenPorts 80,3389

Additional Resources

As a systems administrator, you must automate the task of provisioning Azure VMs. Using PowerShell, you must find a way to issue just one command that will create a Windows VM with ports 80 and 3389 open. Additionally, you must utilize the minimum amount of commands necessary while in the Azure drive.

To consider this hands-on lab complete, please complete the following:

  • Log in to the Azure Portal.
  • Open Cloud Shell and select the PowerShell session to get to a PowerShell prompt (PS :/).
  • Change directory (in the Azure: drive), with either Set-Location or dir, into the subscription and resource group provided with this hands-on lab.
  • Create a new Azure VM, using only the necessary parameters required for that directory.

What are Hands-on Labs

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?