How to Use the lodctr Command in Windows 11 to Rebuild and Repair Corrupted Performance Counters

Windows 11 utilizes Performance Counters to measure real-time hardware telemetry, CPU utilization, disk throughput, network bandwidth, and memory allocation. System utilities such as Task Manager, Performance Monitor (perfmon.msc), Resource Monitor, and enterprise monitoring agents (like Datadog, Zabbix, or SCOM) depend on these counter registries. When third-party applications, system crashes, or corrupted registry keys damage counter strings, Performance Monitor graphs appear blank, Task Manager fails to report GPU/disk activity, or Event Viewer logs Event ID 3001 and 1008 errors. Windows 11 provides lodctr.exe (Load PerfMon Counters) to audit, unregister, and rebuild the entire counter database.

Launching Elevated Terminal Console

Rebuilding Windows performance counters requires modifying protected system registry hives (HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib). Launch the command line with administrative rights:

  1. Press Win + X and choose Terminal (Admin) or PowerShell (Admin).
  2. Ensure the console header indicates Administrator status.

Checking Performance Counter Health and Querying Status

To inspect whether specific counter drivers are currently loaded, disabled, or flagged in the registry, use the /q query switch:

lodctr /q

The console lists all registered extensible performance counter providers (e.g., PerfOS, PerfDisk, NETFramework). Look for any entries marked with:

[DriverName]
    Performance Counters for this service are Disabled

To re-enable a specific disabled counter driver without rebuilding the full database:

lodctr /e:DriverName

Rebuilding All Performance Counters from System Backups

When multiple counters are missing, corrupted, or throwing registry parsing errors, the most effective remediation is a complete rebuild of the core counter registry strings. Windows stores pristine template counter definitions in the system directory.

Execute the rebuild procedure using the following two commands:

cd C:\Windows\System32
lodctr /R

The /R switch reads the master configuration file (PerfStringBackup.ini) and reloads all core Windows base performance counters into the registry. If executed successfully, the terminal returns:

Info: Successfully rebuilt performance counter setting from system backup store

Rebuilding 32-Bit Subsystem Counters (SysWOW64)

On 64-bit Windows 11 installations, 32-bit legacy applications query a distinct WOW64 registry partition. To guarantee complete performance counter parity across both 64-bit and 32-bit architectures, rebuild the 32-bit store as well:

cd C:\Windows\SysWOW64
lodctr /R

Reloading Third-Party and Extensible Service Counters

While lodctr /R restores Windows core operating system counters, third-party server applications (such as Microsoft SQL Server, IIS, or .NET runtime engines) maintain individual configuration .ini definition files. To reload these extensible counters, resynchronise the WMI repository counters:

winmgmt /resyncperf

Then, restart the Windows Management Instrumentation (WMI) and Performance Counter DLL services:

net stop winmgmt /y
net start winmgmt

Command Switch Reference for lodctr.exe

Command Syntax Operational Purpose
lodctr /R Rebuilds all performance counters from the system backup store.
lodctr /q Queries and lists all installed performance counter services.
lodctr /q:[Service] Queries status and configuration for a specific named service.
lodctr /e:[Service] Enables performance counters for the specified service.
lodctr /d:[Service] Disables performance counters for the specified service.
lodctr [File.ini] Installs custom counter definitions defined in an INI manifest.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.