Hi ppl! Nowadays more and more people are starting to use Azure File Sync Service, most probably for testing and POC purposes because the product is still in public preview. One of the most common challenges that you have to deal with is the network bandwidth requirements. Network bandwidth can be a real pain because the File Sync Agent will use any available bandwidth in order to synchronize the files located at the on-premise / cloud world. Fortunately, there is a way to manipulate the network behavior by creating bandwidth throttling schedules!
The option to create throttling schedules is only possible through PowerShell at the moment and I am not so sure that this will change when the product hits GA. In order to achieve this, open an elevated PowerShell Prompt.
- Import Storage Sync PowerShell Module.
#### Import Storage Sync Agent PowerShell Module ####
Import-Module "C:\Program Files\Azure\StorageSyncAgent\StorageSync.Management.ServerCmdlets.dll"
- List the current network throttling schedules.
#### List all Network Throttling Schedules ####
Get-StorageSyncNetworkLimit | ft
- Create a network throttling schedule. The following example sets a schedule for days Monday to Friday with a limit of 20Mbps between hours 00:01 and 23:59. This means that during work days the bandwidth will be limited to 20Mbps while during the weekend it will use any available bandwidth.
#### Create Network Throttling Schedule ####
New-StorageSyncNetworkLimit -Day Monday, Tuesday, Wednesday, Thursday, Friday -StartHour 00 -StartMinute 01 -EndHour 23 -EndMinute 59 -LimitKbps 20000
- Deleting all configured network throttling schedules.
#### Delete all Network Throttling Schedules ####
Get-StorageSyncNetworkLimit | ForEach-Object { Remove-StorageSyncNetworkLimit -Id $_.Id }
- Deleting an individual network throttling schedule.
#### Delete an individual Network Throttling Schedule ####
Get-StorageSyncNetworkLimit | Where Id -eq "{idnumber}" | Remove-StorageSyncNetworkLimit
Thanks for reading!