AADSync Performance Counters Error

While working on a project recently, I came across the following error on my AADSync server:

Log Name:      Application
Source:        ADSync
Date:          1/12/2015 12:47:11 PM
Event ID:      6313
Task Category: Server
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      AADSync.contoso.com
Description: The server encountered an unexpected error creating performance counters for management agent “xxxxx.onmicrosoft.com – AAD”.

Performance counters will not be available for this management agent.

To fix this issue in AADSync, you can either perform a clean install (often out of the question) or run the following commands to reload the performance counters:

  1. Stop AADSync’s service;
  2. Delete the following registry key: [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ADSync\Performance];
  3. Recreate the Performance key;
  4. Run the following two commands from an elevated command prompt:
      • unlodctr.exe ADSync
      • lodctr.exe “C:\Program Files\Microsoft Azure AD Sync\Bin\mmsperf.ini”

5. Start AADSync’s service.

Leave a Comment

Your email address will not be published.

Scroll to Top