Pdhui.dll Errors When Selecting Windows Performance Counters

If Performance Monitor opens but closes when you select Add Counters, test one built-in counter from PowerShell before repairing Windows. A successful sample shows that Windows can collect at least that counter. If the picker only fails for one product’s counters, record that counter set and check the product that installed it.
Choose the symptom to test
- The Add Counters dialog closes or errors immediately. Try a standard local counter outside the picker.
- Only one set of counters is missing or fails. Check the provider, language and instance.
- Several unrelated Windows counters fail. Capture both tool results before changing anything.
What Pdhui.dll is
The Windows file inventory describes pdhui.dll as PDH UI. Microsoft documents a Performance Data Helper interface that lets programs present a counter browsing dialog. Performance counters report values such as memory capacity or activity over time. See Microsoft’s counter browsing example for how selection and data collection work together. An error report that names the interface file is a starting point. The following checks show which part of the operation failed.
1. Compare the picker with a read-only sample
- Open Start, search for Performance Monitor, and open it. In the left pane, select Monitoring Tools → Performance Monitor. Use the green plus button to open Add Counters. Use the local computer for this test and note exactly when the dialog fails.
- Open Windows PowerShell under your usual account. On an English Windows installation, run the command below. It reads three samples from the standard Available MBytes counter at one-second intervals. It creates no collector and changes no settings.
Get-Counter -Counter '\Memory\Available MBytes' -SampleInterval 1 -MaxSamples 3
If Windows uses another display language, run Get-Counter -ListSet * and find the equivalent localized counter set or use a supported counter path from your administrator. Copy names as Windows displays them. An English counter path failing on a localized PC can be a naming mismatch. See Microsoft’s Get-Counter reference for paths, samples and localized names.
Example. The monitor’s graph starts but the green plus button closes the window. PowerShell returns three memory values. Record the time of the picker crash and keep the sample output. If you need immediate basic data, continue using the read-only command while checking the crash details. If that same selection fails inside a different installed monitoring program, record its name and version too.
2. Check the specific counter set or instance
- If built-in counters work and only one vendor counter set is absent, write down the exact name and the product that installs it. Make sure your test uses the intended computer, Windows account and supported product version.
- Check whether the product or its service needs to be running to expose the instance. If you only have trouble from a remote collection tool, repeat the built-in test on the target PC if authorized. Send the local and remote results to the monitoring administrator.
- If the counters disappeared after a product update, use the publisher’s supported repair or configuration steps for that product. Save your existing data collector settings and performance logs before a repair. Leave unrelated counter providers and shared policies in place.
Example. Memory counters work, but no instances appear for one monitoring agent. Start with the agent’s documented status and confirm the installed version supports this Windows build. After its approved repair, reopen the counter picker and check whether the expected instance appears. Then collect a few samples from that exact instance.
3. Investigate a wider Windows failure
If both tools fail on several standard local counters, record their exact errors while using the same authorized account. For a crash, search Start for View reliability history and open the event at the matching time. Save the faulting application, module and exception if they are available. Ask IT about access if the same counters work under another approved account. If Windows reports protected files are missing or damaged, follow Microsoft’s system file repair steps.
Check what the collector actually returns. The command can show a sampling time along with a value. A low available-memory reading is still a successful sample. A permission error, a missing counter name and a blank result are different outcomes. If you are comparing two tools, check that both refer to the same computer and counter path. A remote picker can remember the last machine you entered, and a saved collector may still point to a computer that has been replaced.
Before touching an existing data collector, make a new short test using a built-in counter, or add the counter only to the live graph. That gives you a fresh result without overwriting an earlier baseline. If you are comparing a vendor counter, note whether the chosen process or device was running at sample time and confirm that the same instance name appears in both tools.
Verify counter selection and data collection
Reopen Add Counters, select the original local counter and collect three fresh samples. Check that the intended instance appears and that the sample timestamps advance. If the original issue was in a third-party application, repeat the same operation there. Keep the failed and successful results for comparison. If system inventory queries also fail, see the WinMgmtR.dll diagnostics guide. More component guides are in the DLL Library.