While working on a project recently, I came across the following error on my AADSync server:
Log Name: Application
Date: 1/12/2015 12:47:11 PM
Event ID: 6313
Task Category: Server
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:
- Stop AADSync’s service;
- Delete the following registry key: [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ADSync\Performance];
- Recreate the Performance key;
- Run the following two commands from an elevated command prompt:
lodctr.exe “C:\Program Files\Microsoft Azure AD Sync\Bin\mmsperf.ini”
5. Start AADSync’s service.