Listing Out Files and Directories in Azure Files Shares

30 minutes
  • 2 Learning Objectives

About this Hands-on Lab

In this lab, we will use PowerShell, Azure Storage, and Azure Cloud Shell to list out all the files and directories within an Azure Files share. It is expected that you are familiar with the Azure PowerShell cmdlets as this lab will heavily rely on this knowledge to be completed.

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Get All Files and Directories

You will use the existing and provided PowerShell script from GitHub to get all the files and directories in a specified Azure File Share.

Modify Script to Get File and Directory SMB Timestamp of lastwritetime

In this objective, we will modify the GitHub PowerShell script to get the SMB timestamps of our files and directories within our Azure File Share we specify. Hint: Look at the JSON output of the files and directories to find the SMB metadata properties.

Additional Resources

In this hands-on lab, you will be playing the role of a cloud engineer that has been tasked with listing out the SMB LastWriteTime for all files and directories stored within an Azure Files share. You will start off by either manually creating a script to list out all files and directories or using this script to get all the files and directories in an Azure File share. You will then modify the code of this script to get the SMB LastWriteTime for each file and directory and write that output to the Cloud Shell console. Doing this will allow you to get the required information that an auditor has requested for auditing our file fidelity.

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?