AADSync – The server encountered an unexpected error creating performance counters


Wonder why you get this error as we have seen this is a know issue in many of the MIIS/FIM products installations. Below is the error and the suggested fix:

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
The server encountered an unexpected error creating performance counters for management agent "steady1.onmicrosoft.com - AAD".
Performance counters will not be available for this management agent.
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
    <Provider Name="ADSync" />
    <EventID Qualifiers="32768">6313</EventID>
    <TimeCreated SystemTime="2015-01-12T12:47:11.000000000Z" />
    <Security />
    <Data>steady1.onmicrosoft.com - AAD</Data>


Option 1. Perform a change mode install.

Option 2. Running the following commands from an elevated command prompt, he was able to reload the performance counters for the MA in question:

  1. Stop ADsync Service
  2. Delete registry key: [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ADSync\Performance]
  3. Recreate the 'Performance' registry key.
  4. unlodctr.exe ADSync
  5. lodctr.exe "C:\Program Files\Microsoft Azure AD Sync\Bin\mmsperf.ini”
  6. Start ADsync Service
  7. Looking at perfmon then you can see the counters once again

Comments (4)
  1. F.OGUER says:

    Iin Powershell :

    Stop-Service ADSync
    Remove-Item -Path HKLM:SYSTEMCurrentControlSetServicesADSyncPerformance
    New-Item -Path HKLM:SYSTEMCurrentControlSetServicesADSync -Name Performance –Force
    unlodctr.exe ADSync
    lodctr.exe "C:Program FilesMicrosoft Azure AD SyncBinmmsperf.ini"
    Start-Service ADSync

    1. F.OGUER thanks for the update 🙂

    2. Paul Hatcher says:

      Just to note that the slashes in the registry keys have been stripped out e.g. should be HKLM:SYSTEM\\CurrentControlSet\\Services\\ADSync\\Performance” – whether these will be retained I don’t know 🙂

  2. Phil says:

    Spot on. Thank you.

Comments are closed.

Skip to main content