{"id":1628,"date":"2009-06-12T10:32:02","date_gmt":"2009-06-12T15:32:02","guid":{"rendered":"http:\/\/www.bhargavs.com\/?p=104"},"modified":"2009-06-12T10:32:02","modified_gmt":"2009-06-12T15:32:02","slug":"windows-server-corrupt-missing-performance-counters","status":"publish","type":"post","link":"https:\/\/bhargavs.com\/index.php\/2009\/06\/12\/windows-server-corrupt-missing-performance-counters\/","title":{"rendered":"Corrupt or Missing Performance Counters"},"content":{"rendered":"<p>One of the functions in the code I posted in <a href=\"http:\/\/www.bhargavs.com\/index.php\/technology\/2009\/06\/check-exchange-2003-vitals-powershell-2\/\">\u201cCheck Exchange 2003 vitals with PowerShell\u201d<\/a> is to check performance counters. When running the script, you may encounter an error:<\/p>\n<pre lang=\"PowerShell\" escaped=\"true\">\nGet-WmiObject : Invalid Class\n<\/pre>\n<p>&#160;<\/p>\n<p>This could happen for 2 reasons:<\/p>\n<p>1: You have a typo in Perf Counter object.<\/p>\n<p>2: The performance counter is missing on the host you are checking.<\/p>\n<p>&#160;<\/p>\n<p>When this happened to me, I checked and verified this by loading performance monitor on affected server and trying to load Memory counters which the code was checking for. To no surprise, I found that the server did not have Memory object.<\/p>\n<p>There are many reasons why the performance object could go missing from the OS. The KB article <a href=\"http:\/\/support.microsoft.com\/kb\/300956\" target=\"_blank\" rel=\"noopener noreferrer\">\u201cHow to manually rebuild Performance Counter Library values\u201d<\/a> explains how you can resolve this problem and bring the missing performance counter objects back.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>One of the functions in the code I posted in \u201cCheck Exchange 2003 vitals with PowerShell\u201d is to check performance counters. When running the script, you may encounter an error: [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"pgc_sgb_lightbox_settings":"","jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[19,37],"tags":[212,283,284],"class_list":["post-1628","post","type-post","status-publish","format-standard","hentry","category-powershell","category-windows-server","tag-powershell","tag-windows-server-2003","tag-windows-server-2008"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Corrupt or Missing Performance Counters - Bhargav&#039;s IT Playground<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/bhargavs.com\/index.php\/2009\/06\/12\/windows-server-corrupt-missing-performance-counters\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Corrupt or Missing Performance Counters - Bhargav&#039;s IT Playground\" \/>\n<meta property=\"og:description\" content=\"One of the functions in the code I posted in \u201cCheck Exchange 2003 vitals with PowerShell\u201d is to check performance counters. When running the script, you may encounter an error: [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/bhargavs.com\/index.php\/2009\/06\/12\/windows-server-corrupt-missing-performance-counters\/\" \/>\n<meta property=\"og:site_name\" content=\"Bhargav&#039;s IT Playground\" \/>\n<meta property=\"article:published_time\" content=\"2009-06-12T15:32:02+00:00\" \/>\n<meta name=\"author\" content=\"Bhargav\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Bhargav\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/bhargavs.com\\\/index.php\\\/2009\\\/06\\\/12\\\/windows-server-corrupt-missing-performance-counters\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/bhargavs.com\\\/index.php\\\/2009\\\/06\\\/12\\\/windows-server-corrupt-missing-performance-counters\\\/\"},\"author\":{\"name\":\"Bhargav\",\"@id\":\"https:\\\/\\\/bhargavs.com\\\/#\\\/schema\\\/person\\\/28f6d8c9b29f3a879483d65fc2ab5e26\"},\"headline\":\"Corrupt or Missing Performance Counters\",\"datePublished\":\"2009-06-12T15:32:02+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/bhargavs.com\\\/index.php\\\/2009\\\/06\\\/12\\\/windows-server-corrupt-missing-performance-counters\\\/\"},\"wordCount\":140,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/bhargavs.com\\\/#\\\/schema\\\/person\\\/28f6d8c9b29f3a879483d65fc2ab5e26\"},\"keywords\":[\"PowerShell\",\"Windows Server 2003\",\"Windows Server 2008\"],\"articleSection\":[\"PowerShell\",\"Windows Server\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/bhargavs.com\\\/index.php\\\/2009\\\/06\\\/12\\\/windows-server-corrupt-missing-performance-counters\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/bhargavs.com\\\/index.php\\\/2009\\\/06\\\/12\\\/windows-server-corrupt-missing-performance-counters\\\/\",\"url\":\"https:\\\/\\\/bhargavs.com\\\/index.php\\\/2009\\\/06\\\/12\\\/windows-server-corrupt-missing-performance-counters\\\/\",\"name\":\"Corrupt or Missing Performance Counters - Bhargav&#039;s IT Playground\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/bhargavs.com\\\/#website\"},\"datePublished\":\"2009-06-12T15:32:02+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/bhargavs.com\\\/index.php\\\/2009\\\/06\\\/12\\\/windows-server-corrupt-missing-performance-counters\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/bhargavs.com\\\/index.php\\\/2009\\\/06\\\/12\\\/windows-server-corrupt-missing-performance-counters\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/bhargavs.com\\\/index.php\\\/2009\\\/06\\\/12\\\/windows-server-corrupt-missing-performance-counters\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/bhargavs.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Corrupt or Missing Performance Counters\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/bhargavs.com\\\/#website\",\"url\":\"https:\\\/\\\/bhargavs.com\\\/\",\"name\":\"Bhargav's IT Playground\",\"description\":\"Passion for Technology. Power of Collaboration.\",\"publisher\":{\"@id\":\"https:\\\/\\\/bhargavs.com\\\/#\\\/schema\\\/person\\\/28f6d8c9b29f3a879483d65fc2ab5e26\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/bhargavs.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/bhargavs.com\\\/#\\\/schema\\\/person\\\/28f6d8c9b29f3a879483d65fc2ab5e26\",\"name\":\"Bhargav\",\"logo\":{\"@id\":\"https:\\\/\\\/bhargavs.com\\\/#\\\/schema\\\/person\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/bhargavs.com\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Corrupt or Missing Performance Counters - Bhargav&#039;s IT Playground","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/bhargavs.com\/index.php\/2009\/06\/12\/windows-server-corrupt-missing-performance-counters\/","og_locale":"en_US","og_type":"article","og_title":"Corrupt or Missing Performance Counters - Bhargav&#039;s IT Playground","og_description":"One of the functions in the code I posted in \u201cCheck Exchange 2003 vitals with PowerShell\u201d is to check performance counters. When running the script, you may encounter an error: [&hellip;]","og_url":"https:\/\/bhargavs.com\/index.php\/2009\/06\/12\/windows-server-corrupt-missing-performance-counters\/","og_site_name":"Bhargav&#039;s IT Playground","article_published_time":"2009-06-12T15:32:02+00:00","author":"Bhargav","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Bhargav","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/bhargavs.com\/index.php\/2009\/06\/12\/windows-server-corrupt-missing-performance-counters\/#article","isPartOf":{"@id":"https:\/\/bhargavs.com\/index.php\/2009\/06\/12\/windows-server-corrupt-missing-performance-counters\/"},"author":{"name":"Bhargav","@id":"https:\/\/bhargavs.com\/#\/schema\/person\/28f6d8c9b29f3a879483d65fc2ab5e26"},"headline":"Corrupt or Missing Performance Counters","datePublished":"2009-06-12T15:32:02+00:00","mainEntityOfPage":{"@id":"https:\/\/bhargavs.com\/index.php\/2009\/06\/12\/windows-server-corrupt-missing-performance-counters\/"},"wordCount":140,"commentCount":0,"publisher":{"@id":"https:\/\/bhargavs.com\/#\/schema\/person\/28f6d8c9b29f3a879483d65fc2ab5e26"},"keywords":["PowerShell","Windows Server 2003","Windows Server 2008"],"articleSection":["PowerShell","Windows Server"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/bhargavs.com\/index.php\/2009\/06\/12\/windows-server-corrupt-missing-performance-counters\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/bhargavs.com\/index.php\/2009\/06\/12\/windows-server-corrupt-missing-performance-counters\/","url":"https:\/\/bhargavs.com\/index.php\/2009\/06\/12\/windows-server-corrupt-missing-performance-counters\/","name":"Corrupt or Missing Performance Counters - Bhargav&#039;s IT Playground","isPartOf":{"@id":"https:\/\/bhargavs.com\/#website"},"datePublished":"2009-06-12T15:32:02+00:00","breadcrumb":{"@id":"https:\/\/bhargavs.com\/index.php\/2009\/06\/12\/windows-server-corrupt-missing-performance-counters\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/bhargavs.com\/index.php\/2009\/06\/12\/windows-server-corrupt-missing-performance-counters\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/bhargavs.com\/index.php\/2009\/06\/12\/windows-server-corrupt-missing-performance-counters\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/bhargavs.com\/"},{"@type":"ListItem","position":2,"name":"Corrupt or Missing Performance Counters"}]},{"@type":"WebSite","@id":"https:\/\/bhargavs.com\/#website","url":"https:\/\/bhargavs.com\/","name":"Bhargav's IT Playground","description":"Passion for Technology. Power of Collaboration.","publisher":{"@id":"https:\/\/bhargavs.com\/#\/schema\/person\/28f6d8c9b29f3a879483d65fc2ab5e26"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/bhargavs.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/bhargavs.com\/#\/schema\/person\/28f6d8c9b29f3a879483d65fc2ab5e26","name":"Bhargav","logo":{"@id":"https:\/\/bhargavs.com\/#\/schema\/person\/image\/"},"sameAs":["https:\/\/bhargavs.com"]}]}},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_likes_enabled":true,"jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":97,"url":"https:\/\/bhargavs.com\/index.php\/2009\/06\/12\/check-exchange-2003-vitals-powershell-2\/","url_meta":{"origin":1628,"position":0},"title":"Check Exchange 2003 vitals with PowerShell","author":"Bhargav","date":"June 12, 2009","format":false,"excerpt":"I have written recently about Free System PTEs and \/PAE usage in Exchange 2003 mailbox servers. I set out to write a PowerShell script that will run against given list of servers and report back certain vitals including boot.ini settings, SystemPages registry setting and current performance data for Free Sytem\u2026","rel":"","context":"In &quot;Exchange 2003&quot;","block_context":{"text":"Exchange 2003","link":"https:\/\/bhargavs.com\/index.php\/category\/microsoft\/exchange-server\/exchange-2003\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1035,"url":"https:\/\/bhargavs.com\/index.php\/2015\/06\/22\/disk-performance-information-missing-on-windows-2012-r2-blast-from-the-past\/","url_meta":{"origin":1628,"position":1},"title":"Disk performance information missing on Windows 2012 R2 &#8211; Blast from the past!","author":"Bhargav","date":"June 22, 2015","format":false,"excerpt":"Recently, I replaced a disk in my iScsi NAS. Since I wasn't using any RAID on the disk I was replacing, I decided to copy data from old volume to new using robocopy. As my copy continued in the background, I curiously turned to the performance tab of task manager:\u2026","rel":"","context":"In &quot;Windows Server&quot;","block_context":{"text":"Windows Server","link":"https:\/\/bhargavs.com\/index.php\/category\/microsoft\/windows\/windows-server\/"},"img":{"alt_text":"image","src":"https:\/\/i0.wp.com\/bhargavs.com\/wp-content\/uploads\/2015\/06\/image_thumb.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":134,"url":"https:\/\/bhargavs.com\/index.php\/2009\/06\/22\/exctrlstexe-missing-performance-coutners\/","url_meta":{"origin":1628,"position":2},"title":"Exctrlst.exe &#8211; The case of missing Performance Coutners","author":"Bhargav","date":"June 22, 2009","format":false,"excerpt":"Recently I wrote about how to fix Corrupt of Missing Performance Coutners on a Windows Server. If you read the KB Article mentioned, it may sound complicated. One of the steps is to go through registry and find all services that have performance subkey. This could be very time consuming\u2026","rel":"","context":"In &quot;Windows Server&quot;","block_context":{"text":"Windows Server","link":"https:\/\/bhargavs.com\/index.php\/category\/microsoft\/windows\/windows-server\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1627,"url":"https:\/\/bhargavs.com\/index.php\/2009\/06\/12\/check-exchange-2003-vitals-powershell\/","url_meta":{"origin":1628,"position":3},"title":"Check Exchange 2003 vitals with PowerShell \u2013 Part II","author":"Bhargav","date":"June 12, 2009","format":false,"excerpt":"In continuation to my previous post \u201cCheck Exchange 2003 vitals with PowerShell\u201d, I also have a code block that you can replace if you want to query all exchange servers in your environment dynamically with script instead of using text file as in the code I posted earlier. In the\u2026","rel":"","context":"In &quot;Exchange 2003&quot;","block_context":{"text":"Exchange 2003","link":"https:\/\/bhargavs.com\/index.php\/category\/microsoft\/exchange-server\/exchange-2003\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1650,"url":"https:\/\/bhargavs.com\/index.php\/2010\/03\/29\/script-to-enable-preview-pane-for-powershell-scripts\/","url_meta":{"origin":1628,"position":4},"title":"Script to enable preview pane for PowerShell scripts","author":"Bhargav","date":"March 29, 2010","format":false,"excerpt":"If you are running Windows 7, you probably know what preview pane is. And if you use PowerShell and create ps1 scripts, you may also wonder how can you enable preview for PowerShell scripts in Windows Explorer. Well, Nate Bruneau shared how to edit registry to enable preview for ps1\u2026","rel":"","context":"In &quot;PowerShell&quot;","block_context":{"text":"PowerShell","link":"https:\/\/bhargavs.com\/index.php\/category\/microsoft\/powershell\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1629,"url":"https:\/\/bhargavs.com\/index.php\/2009\/06\/16\/measure-powershell-script-run-time\/","url_meta":{"origin":1628,"position":5},"title":"Measure script run time","author":"Bhargav","date":"June 16, 2009","format":false,"excerpt":"When I am writing PowerShell scripts, one thing that is always in my mind: How long will it take to run this script and what can I do to reduce the run time. While optimizing the code itself is not the scope of this article, what I am going to\u2026","rel":"","context":"In &quot;PowerShell&quot;","block_context":{"text":"PowerShell","link":"https:\/\/bhargavs.com\/index.php\/category\/microsoft\/powershell\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_shortlink":"https:\/\/wp.me\/pkROc-qg","_links":{"self":[{"href":"https:\/\/bhargavs.com\/index.php\/wp-json\/wp\/v2\/posts\/1628","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bhargavs.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bhargavs.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bhargavs.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/bhargavs.com\/index.php\/wp-json\/wp\/v2\/comments?post=1628"}],"version-history":[{"count":0,"href":"https:\/\/bhargavs.com\/index.php\/wp-json\/wp\/v2\/posts\/1628\/revisions"}],"wp:attachment":[{"href":"https:\/\/bhargavs.com\/index.php\/wp-json\/wp\/v2\/media?parent=1628"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bhargavs.com\/index.php\/wp-json\/wp\/v2\/categories?post=1628"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bhargavs.com\/index.php\/wp-json\/wp\/v2\/tags?post=1628"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}