If you are encountering issues with Azure File Sync, or you just want to force the process so that you can free some space now, follow the commands shown below:

``````#Import the commands
Import-Module "C:\Program Files\Azure\StorageSyncAgent\StorageSync.Management.ServerCmdlets.dll"

#Force the synchronization of the folder you have specified in the sync group
Invoke-StorageSyncCloudTiering -Path <sync_group_path>``````

If you want to get some logs out of the operation for troubleshooting, send these commands in a separate PowerShell window before launching the script above:

``````cd C:\
New-Item -ItemType directory -Path C:\AZfslogs
cd "C:\Program Files\Azure\StorageSyncAgent"
Import-Module .\AFSDiag.ps1
Debug-AFS -OutputDirectory C:\AZfslogs -KernelModeTraceLevel verbose -UserModeTraceLevel verbose
``````

You can terminate the command once the sync is concluded and get the logs in the C:\AZfslogs folder.