{"id":4171,"date":"2009-04-21T16:24:57","date_gmt":"2009-04-21T16:24:57","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/powershell\/2009\/04\/21\/v2-quick-tip-monitoring-performance-counters-with-powershell\/"},"modified":"2019-02-18T13:12:41","modified_gmt":"2019-02-18T20:12:41","slug":"v2-quick-tip-monitoring-performance-counters-with-powershell","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/powershell\/v2-quick-tip-monitoring-performance-counters-with-powershell\/","title":{"rendered":"V2 Quick Tip: Monitoring Performance Counters with PowerShell"},"content":{"rendered":"<p>I just got a ping on our internal discussion list about how to get at the Performance counters in PowerShell.&#160; In V2, we&#8217;ve got some nifty cmdlets to help read performance counters.<\/p>\n<p>Here are a few of quick one liners to get you started:<\/p>\n<pre class=\"PowerShellColorizedScript\"><span style=\"color: #006400\"># List all of the performance counters you can monitor<\/span>\n<span style=\"color: #0000ff\">Get-Counter<\/span> <span style=\"color: #000080\">&#8211;listSet<\/span> <span style=\"color: #8a2be2\">*<\/span> <span style=\"color: #a9a9a9\">|<\/span> <span style=\"color: #0000ff\">Select-Object<\/span> <span style=\"color: #000080\">-ExpandProperty<\/span> <span style=\"color: #8a2be2\">Paths<\/span>\n<span style=\"color: #006400\"># Get one sample of the processor time<\/span>\n<span style=\"color: #0000ff\">Get-Counter<\/span> <span style=\"color: #8b0000\">'\\Processor(*)\\% Processor Time'<\/span>\n<span style=\"color: #006400\"># Get a sample of the processor time until you press CTRL + C<\/span>\n<span style=\"color: #0000ff\">Get-Counter<\/span> <span style=\"color: #8b0000\">'\\Processor(*)\\% Processor Time'<\/span> <span style=\"color: #000080\">-Continuous<\/span><\/pre>\n<p>Hope this Helps,<\/p>\n<p>James Brundage [MSFT]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I just got a ping on our internal discussion list about how to get at the Performance counters in PowerShell.&#160; In V2, we&#8217;ve got some nifty cmdlets to help read performance counters. Here are a few of quick one liners to get you started: # List all of the performance counters you can monitor Get-Counter [&hellip;]<\/p>\n","protected":false},"author":600,"featured_media":13641,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[137,334],"class_list":["post-4171","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-powershell","tag-ctp3","tag-v2quicktip"],"acf":[],"blog_post_summary":"<p>I just got a ping on our internal discussion list about how to get at the Performance counters in PowerShell.&#160; In V2, we&#8217;ve got some nifty cmdlets to help read performance counters. Here are a few of quick one liners to get you started: # List all of the performance counters you can monitor Get-Counter [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts\/4171","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/users\/600"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/comments?post=4171"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts\/4171\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/media\/13641"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/media?parent=4171"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/categories?post=4171"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/tags?post=4171"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}