How to Limit Azure File Sync Bandwidth

Share This:

Azure File Sync

By default, Azure File Sync will utilize as much bandwidth as it needs to complete its sync tasks. If you have to sync a lot of large files, this could cause a strain on your network. Unfortunately there’s no way to limit Azure File Sync bandwidth through the Azure portal, instead you have to use Powershell on the server that’s running the Azure Storage Sync Agent.

How to Limit Azure File Sync Bandwidth via Powershell

  • Log into the server where Azure Storage Sync Agent is running
  • Open an Administrative Windows Powershell window
  • Import the StorageSyncAgent module:
    Import-Module 'C:\Program Files\Azure\StorageSyncAgent\StorageSync.Management.ServerCmdlets.dll'
  • Next, you’ll create a schedule. In this example, we’ll set a Mon-Fri 8am to 5pm bandwidth limit of 20mbps:
    New-StorageSyncNetworkLimit -Day Monday, Tuesday, Wednesday, Thursday, Friday -StartHour 8 -EndHour 17 -LimitKbps 20000
  • To set a 24/7 limit of 20mbps, you’ll need to run something similar to this:
    New-StorageSyncNetworkLimit -Day Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday -StartHour 00 -StartMinute 01 -EndHour 23 -EndMinute 59 -LimitKbps 20000

To get a list of all the current bandwidth limit schedules, run:

Get-StorageSyncNetworkLimit | ft

To delete all configured bandwidth limit schedules, run:

Get-StorageSyncNetworkLimit | ForEach-Object { Remove-StorageSyncNetworkLimit -Id $_.Id }

To delete an individual bandwidth limit schedule, run (replace idnumber from the previous Get command):

Get-StorageSyncNetworkLimit | Where Id -eq "{idnumber}" | Remove-StorageSyncNetworkLimit

Share This:


Leave a Reply