Missing Performance Counters

A few days ago, I noticed that most of the usual performance counters were not available in perfmon. When I started perfmon and selected "Performance Monitor" in the TreeView on the left hand side I got an Error Message "Cannot initialize MMC Snap-In". But If I clicked on the same item the second time it works, but then I tried to use some of the standard performance counters like Processor, Logical Disk or Memory, they were missing in the List. Also all .NET and SQL performance counters were not available. Even a system reboot (Windows Vista SP1) did not bring back the standard performance counters.

After some more investigation I found the following knowledge base article:

How to manually rebuild Performance Counter Library values.
Article ID: (KB)300956

This article is originally related to Windows Server 2003 and Windows 2000, but I tried the part which is listed under Rebuilding all Performance Counters worked for me. Just open a Command Prompt running under administrator rights and do the following:

C:> cd windows\system32

C:\Windows\System32> lodctr /R

After that all Performance Counters were available again!

Hope this helps anybody else too

Martin