{"id":1750,"date":"2011-11-11T11:04:07","date_gmt":"2011-11-11T16:04:07","guid":{"rendered":"http:\/\/jdhitsolutions.com\/blog\/?p=1750"},"modified":"2011-11-11T11:04:07","modified_gmt":"2011-11-11T16:04:07","slug":"friday-fun-perf-counters-with-write-progress","status":"publish","type":"post","link":"https:\/\/jdhitsolutions.com\/blog\/powershell\/1750\/friday-fun-perf-counters-with-write-progress\/","title":{"rendered":"Friday Fun Perf Counters with Write-Progress"},"content":{"rendered":"<p>While working on my course for TrainSignal on <a href=\"http:\/\/www.trainsignal.com\/Windows-Server-2008-PowerShell-Training.aspx\" target=\"_blank\">managing Windows Servers with PowerShell<\/a>, I came up with an interesting use of the Write-Progress cmdlet. I was working on the performance monitoring lesson and realized I could use Write-Progress as rudimentary graphing tool. The cmdlet has a parameter that lets you specify a value that shows up as the progress bar. Normally we think about moving from 0 to 100, but you can specify any value. So I thought why not pass a performance counter value? After a little work I came up with this demo script. <!--more--><\/p>\n<p>The script uses Get-WMIObject to retrieve a performance counter property. My demo needs a property with a value between 1 and 100 because I am using the -PercentComplete parameter with Write-Progress. You could use other types of values but you would need to scale it. You also need to only get a single instance. In my demo I'm querying the Win32_PerfFormattedData_PerfDisk_LogicalDisk class, filtering on drive C: The property I'm checking is PercentDiskTime. I use a simple Get-WMIObject expression to retrieve the value.<\/p>\n<p>[cc lang=\"PowerShell\"]<br \/>\n$stat=get-wmiobject -class $activity -filter $filter -computername $computername -ErrorAction Stop<br \/>\n[\/cc]<\/p>\n<p>Then it is simply a matter of using Write-Progress to display it.<\/p>\n<p>[cc lang=\"PowerShell\"]<br \/>\nWrite-progress -Activity $activity -status $status -currentoperation $current -PercentComplete $stat.$Property<br \/>\n[\/cc]<\/p>\n<p>The script loops for as many times as you want. I have a default of 60. You can also specify the interval between samplings. My demo default is 1 second.  Here's what the complete script looks like.<\/p>\n<p>[cc lang=\"PowerShell\"]<br \/>\n<#\n .Synopsis\n Demo WMI Perf Counter Graph\n .Description\n This demonstration script uses the Write-Progress cmdlet to display\n the value of a WMI Performance counter. Ideally, the counter will \n have a value of between 1 and 100. Otherwise you might need to \n scale the value.\n \n You must specify a WMI Performance counter. The demo sample is:\n \n    Win32_PerfFormattedData_PerfDisk_LogicalDisk\n \n and a filter to limit it to a single instance. The demo filter is:\n \n Name='C:'\n \n Finally, select a property. The demo property is PercentDiskTime. \n The demo will check every 1 second (the -Sleep parameter) up to \n 60 times (the -Maximum parameter).\n \n You can also specify the name of a CSV log file to hold the results.\n \n #><\/p>\n<p>[cmdletbinding()]<\/p>\n<p>Param(<br \/>\n[Parameter(Position=0)]<br \/>\n[ValidateNotNullorEmpty()]<br \/>\n[string]$Class=\"Win32_PerfFormattedData_PerfDisk_LogicalDisk\",<br \/>\n[Parameter(Position=1)]<br \/>\n[ValidateNotNullorEmpty()]<br \/>\n[string]$Filter=\"Name='C:'\",<br \/>\n[Parameter(Position=2)]<br \/>\n[ValidateNotNullorEmpty()]<br \/>\n[string]$Property=\"PercentDiskTime\",<br \/>\n[string]$Computername=$env:computername,<br \/>\n[int]$Sleep=1,<br \/>\n[int]$Maximum=60,<br \/>\n[string]$Log<br \/>\n)<\/p>\n<p>Write-Verbose (\"Querying {0} filter {1} on {2} every {3} second(s) {4} times.\" -f $class,$filter,$computername,$sleep,$maximum)<\/p>\n<p>#values for Write-Progress<br \/>\n$activity=$class<br \/>\n$status=\"$Property -> $Filter\"<br \/>\n$current=$computername.ToUpper()<\/p>\n<p>Write-Verbose \"Graphing the $Property property\"<\/p>\n<p>#define an array to hold the results<br \/>\n$results=@()<br \/>\nfor ($i=1; $i -le $maximum; $i++) {<br \/>\n  Try {<br \/>\n    $stat=get-wmiobject -class $activity -filter $filter -computername $computername -ErrorAction Stop<br \/>\n    $results+=$stat<br \/>\n    Write-progress -Activity $activity -status $status -currentoperation $current -PercentComplete $stat.$Property<br \/>\n    sleep -seconds $sleep<br \/>\n  }<br \/>\n  Catch {<br \/>\n    Write-Warning $_.Exception.Message<br \/>\n    Return<br \/>\n  }<br \/>\n}<\/p>\n<p>if ($Log) {<br \/>\n    #export results to a file<br \/>\n    Write-Verbose \"Exporting results to $log\"<br \/>\n    $results | export-csv -Path $log<br \/>\n}<\/p>\n<p>Write-Progress -Activity $activity -status \"Finished\" -Completed<br \/>\nWrite-Verbose \"Finished\"<br \/>\n[\/cc]<\/p>\n<p>Because you might want to save results as well I added a parameter so you could specify a file name. The performance data will be exported to a CSV file.  Here's a brief video of the script in action.<\/p>\n<p><iframe loading=\"lazy\" width=\"560\" height=\"315\" src=\"http:\/\/www.youtube.com\/embed\/3ud99vIm7NA\" frameborder=\"0\" allowfullscreen><\/iframe><\/p>\n<p>This is not a fully developed script but rather a demonstration of how you might use this technique. <\/p>\n<p>Download <a href='http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2011\/11\/demo-wmiperf-progress.txt' target='_blank'>demo-wmiperf-progress<\/a> and let me know what you think.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>While working on my course for TrainSignal on managing Windows Servers with PowerShell, I came up with an interesting use of the Write-Progress cmdlet. I was working on the performance monitoring lesson and realized I could use Write-Progress as rudimentary graphing tool. The cmdlet has a parameter that lets you specify a value that shows&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_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":[4,8,19],"tags":[334,534,335,547,236],"class_list":["post-1750","post","type-post","status-publish","format-standard","hentry","category-powershell","category-scripting","category-wmi","tag-performance-counter","tag-powershell","tag-video","tag-wmi","tag-write-progress"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Friday Fun Perf Counters with Write-Progress &#8226; The Lonely Administrator<\/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:\/\/jdhitsolutions.com\/blog\/powershell\/1750\/friday-fun-perf-counters-with-write-progress\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Friday Fun Perf Counters with Write-Progress &#8226; The Lonely Administrator\" \/>\n<meta property=\"og:description\" content=\"While working on my course for TrainSignal on managing Windows Servers with PowerShell, I came up with an interesting use of the Write-Progress cmdlet. I was working on the performance monitoring lesson and realized I could use Write-Progress as rudimentary graphing tool. The cmdlet has a parameter that lets you specify a value that shows...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/jdhitsolutions.com\/blog\/powershell\/1750\/friday-fun-perf-counters-with-write-progress\/\" \/>\n<meta property=\"og:site_name\" content=\"The Lonely Administrator\" \/>\n<meta property=\"article:published_time\" content=\"2011-11-11T16:04:07+00:00\" \/>\n<meta name=\"author\" content=\"Jeffery Hicks\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@JeffHicks\" \/>\n<meta name=\"twitter:site\" content=\"@JeffHicks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jeffery Hicks\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/1750\\\/friday-fun-perf-counters-with-write-progress\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/1750\\\/friday-fun-perf-counters-with-write-progress\\\/\"},\"author\":{\"name\":\"Jeffery Hicks\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"headline\":\"Friday Fun Perf Counters with Write-Progress\",\"datePublished\":\"2011-11-11T16:04:07+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/1750\\\/friday-fun-perf-counters-with-write-progress\\\/\"},\"wordCount\":466,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"keywords\":[\"Performance counter\",\"PowerShell\",\"video\",\"WMI\",\"Write-progress\"],\"articleSection\":[\"PowerShell\",\"Scripting\",\"WMI\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/1750\\\/friday-fun-perf-counters-with-write-progress\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/1750\\\/friday-fun-perf-counters-with-write-progress\\\/\",\"url\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/1750\\\/friday-fun-perf-counters-with-write-progress\\\/\",\"name\":\"Friday Fun Perf Counters with Write-Progress &#8226; The Lonely Administrator\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#website\"},\"datePublished\":\"2011-11-11T16:04:07+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/1750\\\/friday-fun-perf-counters-with-write-progress\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/1750\\\/friday-fun-perf-counters-with-write-progress\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/1750\\\/friday-fun-perf-counters-with-write-progress\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"PowerShell\",\"item\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/category\\\/powershell\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Friday Fun Perf Counters with Write-Progress\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/\",\"name\":\"The Lonely Administrator\",\"description\":\"Practical Advice for the Automating IT Pro\",\"publisher\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\",\"name\":\"Jeffery Hicks\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg\",\"caption\":\"Jeffery Hicks\"},\"logo\":{\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Friday Fun Perf Counters with Write-Progress &#8226; The Lonely Administrator","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:\/\/jdhitsolutions.com\/blog\/powershell\/1750\/friday-fun-perf-counters-with-write-progress\/","og_locale":"en_US","og_type":"article","og_title":"Friday Fun Perf Counters with Write-Progress &#8226; The Lonely Administrator","og_description":"While working on my course for TrainSignal on managing Windows Servers with PowerShell, I came up with an interesting use of the Write-Progress cmdlet. I was working on the performance monitoring lesson and realized I could use Write-Progress as rudimentary graphing tool. The cmdlet has a parameter that lets you specify a value that shows...","og_url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/1750\/friday-fun-perf-counters-with-write-progress\/","og_site_name":"The Lonely Administrator","article_published_time":"2011-11-11T16:04:07+00:00","author":"Jeffery Hicks","twitter_card":"summary_large_image","twitter_creator":"@JeffHicks","twitter_site":"@JeffHicks","twitter_misc":{"Written by":"Jeffery Hicks","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/1750\/friday-fun-perf-counters-with-write-progress\/#article","isPartOf":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/1750\/friday-fun-perf-counters-with-write-progress\/"},"author":{"name":"Jeffery Hicks","@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"headline":"Friday Fun Perf Counters with Write-Progress","datePublished":"2011-11-11T16:04:07+00:00","mainEntityOfPage":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/1750\/friday-fun-perf-counters-with-write-progress\/"},"wordCount":466,"commentCount":0,"publisher":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"keywords":["Performance counter","PowerShell","video","WMI","Write-progress"],"articleSection":["PowerShell","Scripting","WMI"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/jdhitsolutions.com\/blog\/powershell\/1750\/friday-fun-perf-counters-with-write-progress\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/1750\/friday-fun-perf-counters-with-write-progress\/","url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/1750\/friday-fun-perf-counters-with-write-progress\/","name":"Friday Fun Perf Counters with Write-Progress &#8226; The Lonely Administrator","isPartOf":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#website"},"datePublished":"2011-11-11T16:04:07+00:00","breadcrumb":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/1750\/friday-fun-perf-counters-with-write-progress\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/jdhitsolutions.com\/blog\/powershell\/1750\/friday-fun-perf-counters-with-write-progress\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/1750\/friday-fun-perf-counters-with-write-progress\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"PowerShell","item":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell\/"},{"@type":"ListItem","position":2,"name":"Friday Fun Perf Counters with Write-Progress"}]},{"@type":"WebSite","@id":"https:\/\/jdhitsolutions.com\/blog\/#website","url":"https:\/\/jdhitsolutions.com\/blog\/","name":"The Lonely Administrator","description":"Practical Advice for the Automating IT Pro","publisher":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/jdhitsolutions.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9","name":"Jeffery Hicks","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg","url":"https:\/\/secure.gravatar.com\/avatar\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg","caption":"Jeffery Hicks"},"logo":{"@id":"https:\/\/secure.gravatar.com\/avatar\/832ae5d438fdcfc1420d720cd1991307927de8a0b12f2342e81c30f773e21098?s=96&d=wavatar&r=pg"}}]}},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":7471,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/7471\/a-powershell-network-monitor\/","url_meta":{"origin":1750,"position":0},"title":"A PowerShell Network Monitor","author":"Jeffery Hicks","date":"May 12, 2020","format":false,"excerpt":"I hope you've been trying your hand at the scripting challenges being posted on the Iron Scripter website. The challenges are designed for individuals to do on their own to build up their PowerShell scripting skills. A few weeks ago, a challenge was posted to create a network monitoring tool\u2026","rel":"","context":"In &quot;PowerShell&quot;","block_context":{"text":"PowerShell","link":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/05\/netperf-2.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/05\/netperf-2.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/05\/netperf-2.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/05\/netperf-2.png?resize=700%2C400&ssl=1 2x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/05\/netperf-2.png?resize=1050%2C600&ssl=1 3x"},"classes":[]},{"id":3497,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/3497\/resolving-sids-with-wmi-wsman-and-powershell\/","url_meta":{"origin":1750,"position":1},"title":"Resolving SIDs with WMI, WSMAN and PowerShell","author":"Jeffery Hicks","date":"October 15, 2013","format":false,"excerpt":"In the world of Windows, an account SID can be a very enigmatic thing. Who is S-1-5-21-2250542124-3280448597-2353175939-1019? Fortunately, many applications, such as the event log viewer resolve the SID to an account name. The downside, is that when you are accessing that same type of information from PowerShell, you end\u2026","rel":"","context":"In &quot;PowerShell&quot;","block_context":{"text":"PowerShell","link":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell\/"},"img":{"alt_text":"win32_sid-fail","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/10\/win32_sid-fail-1024x330.png?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/10\/win32_sid-fail-1024x330.png?resize=350%2C200 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/10\/win32_sid-fail-1024x330.png?resize=525%2C300 1.5x"},"classes":[]},{"id":1667,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/1667\/compress-files-by-extension\/","url_meta":{"origin":1750,"position":2},"title":"Compress Files By Extension","author":"Jeffery Hicks","date":"October 3, 2011","format":false,"excerpt":"I never seem to build my test virtual machines with enough disk space. Which means at some point I start dealing with space issues and resort to all sorts of hacks to buy myself a little time. One thing I do is look for files that I can compact using\u2026","rel":"","context":"In &quot;PowerShell&quot;","block_context":{"text":"PowerShell","link":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2011\/10\/compress-filetype-300x212.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":4839,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4839\/friday-fun-improved-powershell-napping\/","url_meta":{"origin":1750,"position":3},"title":"Friday Fun: Improved PowerShell Napping","author":"Jeffery Hicks","date":"January 29, 2016","format":false,"excerpt":"So I had some fun with my post last week on taking a nap with PowerShell. I got some great feedback on Twitter and a new comments on the blog. My initial effort was a relatively simple PowerShell script which certainly got the job done. But I there were a\u2026","rel":"","context":"In &quot;Friday Fun&quot;","block_context":{"text":"Friday Fun","link":"https:\/\/jdhitsolutions.com\/blog\/category\/friday-fun\/"},"img":{"alt_text":"image","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2016\/01\/image_thumb-23.png?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2016\/01\/image_thumb-23.png?resize=350%2C200 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2016\/01\/image_thumb-23.png?resize=525%2C300 1.5x"},"classes":[]},{"id":1201,"url":"https:\/\/jdhitsolutions.com\/blog\/wmi\/1201\/new-event-report-revised\/","url_meta":{"origin":1750,"position":4},"title":"New Event Report Revised","author":"Jeffery Hicks","date":"March 8, 2011","format":false,"excerpt":"Last year I posted an update to an old Mr. Roboto script that was an update to an even older VBScript. Still with me? My last revision leveraged the new Get-WinEvent cmdlet to create an HTML report of recent error activity on one or more computers. The problem was that\u2026","rel":"","context":"In &quot;Mr. Roboto&quot;","block_context":{"text":"Mr. Roboto","link":"https:\/\/jdhitsolutions.com\/blog\/category\/mr-roboto\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":639,"url":"https:\/\/jdhitsolutions.com\/blog\/scripting\/639\/join-object\/","url_meta":{"origin":1750,"position":5},"title":"Join Object","author":"Jeffery Hicks","date":"May 14, 2010","format":false,"excerpt":"Related to some of the WMI stuff I\u2019ve been working on lately is the idea of melding or joining objects. This comes about because I often see forum posts from administrators looking to collect information from different WMI classes but present it as a single object. One way you might\u2026","rel":"","context":"In &quot;PowerShell v2.0&quot;","block_context":{"text":"PowerShell v2.0","link":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell-v2-0\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/1750","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/comments?post=1750"}],"version-history":[{"count":0,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/1750\/revisions"}],"wp:attachment":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=1750"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=1750"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=1750"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}