Featured resource
2025 Tech Upskilling Playbook
Tech Upskilling Playbook

Build future-ready tech teams and hit key business milestones with seven proven plays from industry leaders.

Check it out
  • Lab
    • Libraries: If you want this lab, consider one of these libraries.
    • Cloud
Azure icon
Labs

Creating Azure Storage and Transferring Data Using PowerShell

There may be a time where you find yourself wanting to transfer data from your local workstation into an Azure Storage account. In those cases, there is a PowerShell command for that. PowerShell is a powerful tool, which helps you with a lot of administrative tasks — one of those being transferring files. In this hands-on lab, you will be tasked with using PowerShell to create a storage account and storage container, taking files that reside on a Linux VM, and transferring them to an Azure Storage container.

Azure icon
Lab platform
Lab Info
Level
Intermediate
Last updated
Sep 15, 2025
Duration
45m

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.
Table of Contents
  1. Challenge

    Log in to the Linux VM
    1. Open a new terminal.

    2. Copy the public IP address provided with this hands-on lab.

    3. Log in via SSH:

      ssh cloud_user@<PUBLIC_IP_OF_THE_VM>
      
    4. Once logged in, start the PowerShell prompt:

      pwsh 
      
  2. Challenge

    Install the Az Module and Connect to Azure
    1. Install the module:

      Install-Module -Name Az -AllowClobber -Scope CurrentUser
      
    2. Enter Y to continue installing from the PowerShell gallery.

    3. From the PowerShell prompt, connect to Azure:

      Connect-AzAccount
      
    4. Go to https://microsoft.com/devicelogin and enter the code provided in the terminal.

    5. Enter the username and password provided with this hands-on lab.

  3. Challenge

    Create the Storage Account and Container
    1. Create the variable $location and set it to westus.

    2. Create the variable $resourceGroup and assign it to the resource group given with the lab ($resourceGroup = "<RESOURCE_GROUP_WITH_THE_LAB>").

    3. Create the storage account, replacing <UNIQUE_STORAGE_ACCOUNT_NAME> with a globally unique name:

      $storageAccount = New-AzStorageAccount -ResourceGroupName $resourceGroup `
        -Name "<UNIQUE_STORAGE_ACCOUNT_NAME>" `
        -SkuName Standard_LRS `
        -Location $location
      
    4. Set the storage context (a reference to the correct storage account):

      $ctx = $storageAccount.Context
      
    5. Create the storage container:

      $containerName = "images"
      
      New-AzStorageContainer -Name $containerName -Context $ctx -Permission blob
      
  4. Challenge

    Copy the File into the Storage Container
    1. Download the file:

      wget http://ww1.prweb.com/prfiles/2019/12/16/16790924/badge-full.png
      
    2. Transfer the file to the newly created storage container:

      Set-AzStorageBlobContent -File "./badge-full.png" `
        -Container $containerName `
        -Blob "badge-full.png" `
        -Context $ctx 
      
About the author

Pluralsight Skills gives leaders confidence they have the skills needed to execute technology strategy. Technology teams can benchmark expertise across roles, speed up release cycles and build reliable, secure products. By leveraging our expert content, skill assessments and one-of-a-kind analytics, keep up with the pace of change, put the right people on the right projects and boost productivity. It's the most effective path to developing tech skills at scale.

Real skill practice before real-world application

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.

Learn by doing

Engage hands-on with the tools and technologies you’re learning. You pick the skill, we provide the credentials and environment.

Follow your guide

All labs have detailed instructions and objectives, guiding you through the learning process and ensuring you understand every step.

Turn time into mastery

On average, you retain 75% more of your learning if you take time to practice. Hands-on labs set you up for success to make those skills stick.

Get started with Pluralsight