Symptoms

When you try to install the Microsoft System Center Operations Manager 2016, 2012 R2, or 2012 agent on Windows Server 2008 Service Pack 2, the installation fails, and you receive the following error message:

Error 25211. Failed to install performance counters.. Error Code: -2147024809 (The parameter is incorrect.).

Note: You may receive a different error code, such as the following:

Error Code: -2147024894 (The system cannot find the file specified.).

Additionally, the event log displays the following event:

Event Type: Error
Event Source: MsiInstaller
Event Category: None
Event ID: 10005
User:  <USER_NAME>
Computer: <COMPUTER_NAME>
Description:
Product: System Center Operations Manager <VERSION> Agent — Error 25211.Failed to install performance counters.. Error Code: -2147024809 (The parameter is incorrect.).

Cause

This issue occurs for any of the following reasons:

  • Some registry keys are missing.
  • The Perfh009.dat file is locked by another process.
  • Some performance counters are corrupted.

Resolution

To fix this issue, try the following steps in the given order:

  1. Install the Operations Manager agent by running the following command at an elevated command prompt:

    msiexec.exe /i MOMAgent.msi NOAPM=1

    If the issue persists, go to step 2.

  2. Determine whether the following full registry subkeys exist:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\HealthService\Performance

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MOMConnector\Performance

    Create the indicated “Performance” keys if they don’t exist, and then reinstall the Operations Manager agent.

    Note You don’t have to create values for the new registry keys.

    If the issue persists, go to step 3.

  3. Use a tool such as Process Monitor or Process Explorer to determine whether Perfh009.dat is locked by another process. If Perfh009.dat is locked, stop the other process, and then reinstall the operations Manager agent.If Perfh009.dat isn’t locked or if the issue persists, go to step 4.
  4. Rebuild the performance counter library, and then reinstall the Operations Manager agent.

Read the original article here.