Table of Contents
Introduction
Managing files across multiple servers and keeping them in sync has always been a challenge for IT admins. Organizations often struggle with storage sprawl, users saving files in different places, and the need for centralized backup.
That’s where Azure File Sync comes in. With Azure File Sync, you can centralize your organization’s file shares in Azure Files while keeping the flexibility, performance, and compatibility of an on-premises Windows Server.
In this blog, we’ll walk through:
Azure File Sync pricing
What Azure File Sync is
Why it’s useful
How to configure it step by step (Portal + PowerShell)
The role of the Azure File Sync Agent
Cloud tiering explained
What is Azure File Sync?
Azure File Sync is a Microsoft service that allows you to synchronize file shares on Windows Servers with Azure Files.
Think of it like this: Azure File Sync makes Azure Files the “hub” while your on-premises servers act as “spokes.” All data is stored centrally in Azure Files, but you can cache frequently accessed files locally for performance.
Key Features:
- Centralized storage: Consolidate file shares in Azure Files.
- Multi-site sync: Sync files across multiple servers.
- Cloud tiering: Keep hot data on-prem, offload cold data to Azure.
- Disaster recovery: Replace a failed server by syncing to a new one.
- Backup integration: Use Azure Backup to protect your data in the cloud.
Why Use Azure File Sync?
Here’s why organizations adopt Azure File Sync:
- Hybrid flexibility – Keep fast local access while enjoying cloud scalability.
- Reduced storage costs – Tier old or less-used files to Azure, freeing local storage.
- Disaster recovery ready – Quickly restore file servers without restoring terabytes of data.
- Global consistency – Sync files across offices in different regions.
Prerequisites
Before configuring, make sure you have:
- An Azure subscription.
- An Azure Storage Account with an Azure file share created.
- A Windows Server 2016 or later.
- The Azure File Sync Agent installed (covered below).
- Contributor permissions in your Azure subscription.
Step 1: Create an Azure Storage Account and File Share
Portal Method:
- In the Azure Portal, go to Storage accounts → + Create.
- Choose Resource Group, name, and region.
- After creation, open the storage account → File shares → + File share.
PowerShell Method:
# Variables
$resourceGroup = "FileSyncRG"
$location = "EastUS"
$storageAccount = "mystorageacctfsync"
$fileShare = "companyfiles"
# Create resource group
New-AzResourceGroup -Name $resourceGroup -Location $location
# Create storage account
New-AzStorageAccount -ResourceGroupName $resourceGroup `
-Name $storageAccount `
-Location $location `
-SkuName Standard_LRS `
-Kind StorageV2
# Get storage context
$ctx = (Get-AzStorageAccount -ResourceGroupName $resourceGroup -Name $storageAccount).Context
# Create file share
New-AzStorageShare -Name $fileShare -Context $ctx
Step 2: Deploy Azure File Sync Service
Portal Method:
- Search Azure File Sync → + Create.
- Select Resource Group, Region, and name.
PowerShell Method:
# Variables
$syncServiceName = "MyFileSyncService"
# Create Azure File Sync service
New-AzStorageSyncService -ResourceGroupName $resourceGroup `
-StorageSyncServiceName $syncServiceName `
-Location $location
Step 3: Install and Configure the Azure File Sync Agent
Think of the Azure File Sync Agent as the “translator + messenger” installed on your Windows Server.
Without the agent, your server has no idea how to talk to Azure File Sync. With the agent:
Your server can send files up to Azure Files. It can pull down files when needed. It follows the rules you set for tiering and sync.
Basically, it’s the bridge between your local world (on-premises server) and the cloud (Azure Files).
It keeps your local file server and your Azure File Share in sync. Any change you make on-prem (add, delete, update files) → the agent uploads it to Azure. Any change in Azure (say another branch server syncs files) → your local server gets updated.
This ensures your users always see the same set of files, no matter where they are.
Supported OS versions
- Windows Server 2016
- Windows Server 2019
- Windows Server 2022
Download and Install the Agent
- Go to Microsoft Download Center and download the latest agent.
- Install the MSI package on your Windows Server.
- Restart the server if prompted.
Register the Server with Azure
After installing the agent, you need to register your server to your Azure File Sync service:
- Launch the Server Registration UI (installed with the agent).
- Sign in with your Azure account.
- Choose the Subscription, Resource Group, and the Azure File Sync Service you created earlier.
This process generates a Server Resource ID that you’ll later use in PowerShell to add server endpoints.
PowerShell Tip: Verify Agent Installation
Get-Service | Where-Object { $_.DisplayName -like "*File Sync*" }
You should see services like:
- Azure File Sync FileSyncSvc (sync engine)
- Storage Sync Agent Updater
If these are running, your agent is properly installed.
Step 4: Create a Sync Group and Add Endpoints
Portal Method:
- In your File Sync service, click + Sync group → Choose your storage account and file share → Add server endpoint.
PowerShell Method:
# Variables
$syncGroupName = "MySyncGroup"
$serverResourceId = "<Server-Resource-ID>" # Obtained after registering server
$path = "D:\CompanyFiles"
# Create sync group
New-AzStorageSyncGroup -ResourceGroupName $resourceGroup `
-StorageSyncServiceName $syncServiceName `
-SyncGroupName $syncGroupName `
-StorageAccountResourceId (Get-AzStorageAccount -ResourceGroupName $resourceGroup -Name $storageAccount).Id `
-StorageAccountShareName $fileShare
# Add server endpoint
New-AzStorageSyncServerEndpoint -ResourceGroupName $resourceGroup `
-StorageSyncServiceName $syncServiceName `
-SyncGroupName $syncGroupName `
-ServerResourceId $serverResourceId `
-ServerLocalPath $path `
-CloudTiering $true `
-VolumeFreeSpacePercent 20
Step 5: Cloud Tiering Explained
One of the most powerful features of Azure File Sync is Cloud Tiering.
- Frequently accessed files stay on the local server.
- Infrequently accessed (cold) files are tiered to Azure Files.
- Users still see the full namespace, even if some files are stored only in the cloud.
- Files are automatically rehydrated (downloaded back) when accessed.
Example:
You might have a 5 TB file share, but your server only has 1 TB of disk space. With tiering enabled, only the most-used 20–30% of files remain local, while the rest are in Azure.
In PowerShell, tiering is enabled with:
-CloudTiering $true -VolumeFreeSpacePercent 20
This keeps 20% of local disk space free by tiering rarely used files.
Step 6: Azure File Sync Pricing
Azure File Sync has two main cost components:
- File Sync Service charges
- Around $5 per registered server per month.
- Storage costs (Azure Files)
- You pay for the Azure File share itself, based on capacity and performance tier (Standard HDD vs Premium SSD).
- Transaction costs
- Operations like sync, write/read transactions, and metadata calls incur small additional charges.
- Outbound data transfer
- If files are accessed outside of Azure region, bandwidth charges may apply.
👉 Example:
- 2 Windows Servers registered ($10/month)
- 1 TB Standard Azure File share ($20/month approx.)
- Sync transactions: a few extra dollars depending on activity
Overall, Azure File Sync is cost-effective compared to buying additional on-premises storage.
Step 7: Test Sync
- Copy files into
D:\CompanyFiles
on the server. - Check if they appear in the Azure File Share.
- Verify bidirectional sync.
Conclusion
Azure File Sync bridges the gap between cloud and on-premises file servers, giving you cloud scale + local performance. By combining portal steps with PowerShell automation, and leveraging the Azure File Sync Agent, you gain both flexibility and cost-efficiency.
Features like cloud tiering and predictable pricing make it even more attractive for enterprises looking to optimize storage.
- Rate