hands-on lab

Automate Azure File Sync Deployments with PowerShell

Intermediate
Up to 1h
253
4.3/5
Get guided in a real environmentPractice with a step-by-step scenario in a real, provisioned environment.
Learn and validateUse validations to check your solutions every step of the way.
See resultsTrack your knowledge and monitor your progress.
Lab description

Automation plays a key role in corporate agility and DevOps culture. This lab illustrates how to automate the creation of resources in Azure, and the configuration of a Windows Server 2019 VM with the goal of setting up an Azure File Sync group—a practical and non-trivial task. You will create an Azure File Sync Group with a single server in it. The beauty of automation is that you could apply the same procedure to as many servers as you like for your own environments. The PowerShell scripts you develop in this lab could easily be used within PowerShell DSC for large-scale deployments involving dozens or more servers.

Lab Objectives

Upon completion of this Lab, you will be able to:

  • Completely automate the deployment of Azure File Sync using PowerShell
  • Understand and use Azure VM extensions, particularly the Custom Script Extension
  • Use Cloud Academy's Hosted IDE for PowerShell to edit and execute PowerShell scripts
  • Explain how to automate other Azure workloads in PowerShell

Lab Prerequisites

You should be familiar with:

  • Azure File Sync
  • Azure PowerShell basics

The following Cloud Academy content can be used to meet the Lab's prerequisites:

Updates

June 5th, 2023 - Resolved an issue that caused the lab to fail to setup on rare occasions

December 21st, 2022 - Updated lab to use Cloud Academy's Hosted IDE, the Azure Az PowerShell module, and Windows Server 2019

May 22nd, 2020 - Updated a validation check to more accurately reflect whether students have met the conditions of the lab

May 5th, 2020 - Added a validation check function to check the work done in the lab

Nov. 17th, 2019 - Changed lab region to South Central US to avoid an issue that prevented completion of the lab in West US

Environment before

Environment after

About the author
Avatar
Logan Rakai, opens in a new tab
Lead Content Developer - Labs
Students
219,128
Labs
223
Courses
9
Learning paths
57

Logan has been involved in software development and research since 2007 and has been in the cloud since 2012. He is an AWS Certified DevOps Engineer - Professional, AWS Certified Solutions Architect - Professional, Microsoft Certified Azure Solutions Architect Expert, MCSE: Cloud Platform and Infrastructure, Google Cloud Certified Associate Cloud Engineer, Certified Kubernetes Security Specialist (CKS), Certified Kubernetes Administrator (CKA), Certified Kubernetes Application Developer (CKAD), and Certified OpenStack Administrator (COA). He earned his Ph.D. studying design automation and enjoys all things tech.

LinkedIn, Twitter, GitHub

Covered topics
Lab steps
Creating a File Share in Azure Files with PowerShell
Installing the Azure File Sync Agent on the Target VM
Automating Deployment of an Azure File Sync Group
Testing the Automated Azure File Sync Deployment