Uredi

Collect logs and traces on the Azure File Sync server

Summary

If troubleshooting steps don't resolve your issue, use AFSDiag to collect logs and traces on the Azure File Sync server, then send the .zip output to your support engineer for further diagnosis.

Use the AFSDiag tool to collect logs and traces

To run AFSDiag and collect logs and traces, follow these steps:

  1. Open an elevated PowerShell window, and then run the following commands (press Enter after each command):

    Note

    AFSDiag creates the output directory and a temp folder within it before collecting logs. It deletes the temp folder after execution. Specify an output location that doesn't contain data.

    Import-Module "C:\Program Files\Azure\StorageSyncAgent\StorageSync.Management.ServerCmdlets.dll"
    Debug-StorageSyncServer -AFSDiag -OutputDirectory C:\output -KernelModeTraceLevel Verbose -UserModeTraceLevel Verbose
    
  2. Reproduce the issue. When you finish, enter D.

  3. A .zip file that contains logs and trace files is saved to the output directory that you specified.