{"id":3881,"date":"2014-06-16T11:32:06","date_gmt":"2014-06-16T15:32:06","guid":{"rendered":"http:\/\/jdhitsolutions.com\/blog\/?p=3881"},"modified":"2015-06-21T12:25:11","modified_gmt":"2015-06-21T16:25:11","slug":"scraping-sysinternals","status":"publish","type":"post","link":"https:\/\/jdhitsolutions.com\/blog\/powershell\/3881\/scraping-sysinternals\/","title":{"rendered":"Scraping Sysinternals"},"content":{"rendered":"<p><a href=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2014\/06\/download-thumb.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-full wp-image-3882\" src=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2014\/06\/download-thumb.jpg\" alt=\"download-thumb\" width=\"169\" height=\"113\" \/><\/a>Recently I was conversing with someone about my PowerShell code that <a title=\"Download SysInternals with PowerShell\" href=\"http:\/\/jdhitsolutions.com\/blog\/powershell-3-0\/3522\/download-sysinternals-with-powershell\/\" target=\"_blank\">downloads tools<\/a> from the live Sysinternals site. If you search the Internet, you'll find plenty of ways to achieve the same goal. But we were running into a problem where PowerShell was failing to get information from the site. From my testing and research I'm guessing there was a timing issue when the site is too busy. So I started playing around with some alternatives.<\/p>\n<p>I knew that I could easily get the html content from http:\/\/live.sysinternals.com through a few different commands. I chose to use Invoke-RestMethod for the sake of simplicity.<\/p>\n<pre class=\"lang:ps decode:true \">[string]$html = Invoke-RestMethod \"http:\/\/live.sysinternals.com\"\r\n<\/pre>\n<p>Because $html is one long string with predictable patterns, I realized I could use my <a title=\"Convert Text to Object with PowerShell and Regular Expressions\" href=\"http:\/\/jdhitsolutions.com\/blog\/scripting\/3673\/convert-text-to-object-with-powershell-and-regular-expressions\/\" target=\"_blank\">script to convert text to objects<\/a> using named regular expression patterns. In my test script, I dot source this script.<\/p>\n<pre class=\"lang:ps decode:true \">#need this function\r\n. C:\\scripts\\convertfrom-text.ps1<\/pre>\n<p>Now for the fun part. I had to build a regular expression pattern. Eventually I arrived at this:<\/p>\n<pre class=\"lang:ps decode:true \">$pattern = \"(?&lt;date&gt;\\w+,\\s\\w+\\s\\d{1,2},\\s\\d{4}\\s+\\d{1,2}:\\d{2}\\s+\\w{2})\\s+(?&lt;size&gt;\\d+)\\s+&lt;A HREF=\"\"\/(?&lt;name&gt;\\w+(\\.\\w+){1,2})\"\r\n<\/pre>\n<p>If you have used the Sysinternals site, you'll know there is also a Tools \"subfolder\" that appears to be essentially the same as the top level site. My pattern is for the top level site. Armed with this pattern, it wasn't difficult to create an array of objects for each tool.<\/p>\n<pre class=\"lang:ps decode:true \">$data = $html | ConvertFrom-Text $pattern | \r\nSelect @{Name=\"LastModified\";Expression={$_.Date -as [DateTime]}},\r\n@{Name=\"Size\";Expression={$_.Size -as [int]}},Name,\r\n@{Name=\"Path\";Expression={ \"http:\/\/live.sysinternals.com\/$($_.name)\"}}<\/pre>\n<p><a href=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2014\/06\/sysinternals.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-3885\" src=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2014\/06\/sysinternals-300x232.png\" alt=\"sysinternals\" width=\"300\" height=\"232\" srcset=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2014\/06\/sysinternals-300x232.png 300w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2014\/06\/sysinternals.png 1002w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Next, I check my local directory and get the most recent file.<\/p>\n<pre class=\"lang:ps decode:true \">#get most recently modified local file\r\n$localfiles = dir G:\\Sysinternals\r\n$lastLocal = ( $localfiles | sort LastWriteTime | select -last 1).LastWriteTime\r\n<\/pre>\n<p>Then I can test for files that don't exist locally or are newer on the site.<\/p>\n<pre class=\"lang:ps decode:true \">#find files that have a newer time stamp or files that exist remotely but not locally\r\n$needed = $data | where { ($_.LastModified -gt $lastlocal) -OR ( $localfiles.name -notcontains $_.name ) }\r\n<\/pre>\n<p>If there are needed files, then I create a System.Net.WebClient object and download the files.<\/p>\n<pre class=\"lang:ps decode:true \">if ($needed) {\r\n    Write-Host \"Getting $($needed.count) updated files\" -ForegroundColor Cyan\r\n    $needed | foreach -begin { $wc = New-Object System.Net.WebClient \r\n    } -process {\r\n     $target = Join-Path -Path \"G:\\Sysinternals\" -ChildPath $_.name\r\n     $source = $_.Path\r\n     Write-host \"Updating $target from $source\" -ForegroundColor Green\r\n     $wc.DownloadFile($source,$target)\r\n    }\r\n}\r\nelse {\r\n    Write-Host \"No updated files detected\" -ForegroundColor Cyan\r\n}<\/pre>\n<p>The end result is that I can update my local Sysinternals folder very quickly and not worry about timing problems using the Webclient service.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Recently I was conversing with someone about my PowerShell code that downloads tools from the live Sysinternals site. If you search the Internet, you&#8217;ll find plenty of ways to achieve the same goal. But we were running into a problem where PowerShell was failing to get information from the site. From my testing and research&#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":"Scraping Sysinternals with #PowerShell http:\/\/wp.me\/p1nF6U-10B","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[4,359,8],"tags":[429,534,268,250,540,47],"class_list":["post-3881","post","type-post","status-publish","format-standard","hentry","category-powershell","category-powershell-3-0","category-scripting","tag-invoke-restmethod","tag-powershell","tag-regex","tag-regular-expressions","tag-scripting","tag-sysinternals"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Scraping Sysinternals &#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\/3881\/scraping-sysinternals\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Scraping Sysinternals &#8226; The Lonely Administrator\" \/>\n<meta property=\"og:description\" content=\"Recently I was conversing with someone about my PowerShell code that downloads tools from the live Sysinternals site. If you search the Internet, you&#039;ll find plenty of ways to achieve the same goal. But we were running into a problem where PowerShell was failing to get information from the site. From my testing and research...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/jdhitsolutions.com\/blog\/powershell\/3881\/scraping-sysinternals\/\" \/>\n<meta property=\"og:site_name\" content=\"The Lonely Administrator\" \/>\n<meta property=\"article:published_time\" content=\"2014-06-16T15:32:06+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2015-06-21T16:25:11+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2014\/06\/download-thumb.jpg\" \/>\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\\\/3881\\\/scraping-sysinternals\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/3881\\\/scraping-sysinternals\\\/\"},\"author\":{\"name\":\"Jeffery Hicks\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"headline\":\"Scraping Sysinternals\",\"datePublished\":\"2014-06-16T15:32:06+00:00\",\"dateModified\":\"2015-06-21T16:25:11+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/3881\\\/scraping-sysinternals\\\/\"},\"wordCount\":286,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"image\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/3881\\\/scraping-sysinternals\\\/#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2014\\\/06\\\/download-thumb.jpg\",\"keywords\":[\"Invoke-RestMethod\",\"PowerShell\",\"regex\",\"Regular Expressions\",\"Scripting\",\"Sysinternals\"],\"articleSection\":[\"PowerShell\",\"Powershell 3.0\",\"Scripting\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/3881\\\/scraping-sysinternals\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/3881\\\/scraping-sysinternals\\\/\",\"url\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/3881\\\/scraping-sysinternals\\\/\",\"name\":\"Scraping Sysinternals &#8226; The Lonely Administrator\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/3881\\\/scraping-sysinternals\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/3881\\\/scraping-sysinternals\\\/#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2014\\\/06\\\/download-thumb.jpg\",\"datePublished\":\"2014-06-16T15:32:06+00:00\",\"dateModified\":\"2015-06-21T16:25:11+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/3881\\\/scraping-sysinternals\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/3881\\\/scraping-sysinternals\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/3881\\\/scraping-sysinternals\\\/#primaryimage\",\"url\":\"http:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2014\\\/06\\\/download-thumb.jpg\",\"contentUrl\":\"http:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2014\\\/06\\\/download-thumb.jpg\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/3881\\\/scraping-sysinternals\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"PowerShell\",\"item\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/category\\\/powershell\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Scraping Sysinternals\"}]},{\"@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":"Scraping Sysinternals &#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\/3881\/scraping-sysinternals\/","og_locale":"en_US","og_type":"article","og_title":"Scraping Sysinternals &#8226; The Lonely Administrator","og_description":"Recently I was conversing with someone about my PowerShell code that downloads tools from the live Sysinternals site. If you search the Internet, you'll find plenty of ways to achieve the same goal. But we were running into a problem where PowerShell was failing to get information from the site. From my testing and research...","og_url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/3881\/scraping-sysinternals\/","og_site_name":"The Lonely Administrator","article_published_time":"2014-06-16T15:32:06+00:00","article_modified_time":"2015-06-21T16:25:11+00:00","og_image":[{"url":"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2014\/06\/download-thumb.jpg","type":"","width":"","height":""}],"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\/3881\/scraping-sysinternals\/#article","isPartOf":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/3881\/scraping-sysinternals\/"},"author":{"name":"Jeffery Hicks","@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"headline":"Scraping Sysinternals","datePublished":"2014-06-16T15:32:06+00:00","dateModified":"2015-06-21T16:25:11+00:00","mainEntityOfPage":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/3881\/scraping-sysinternals\/"},"wordCount":286,"commentCount":0,"publisher":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"image":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/3881\/scraping-sysinternals\/#primaryimage"},"thumbnailUrl":"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2014\/06\/download-thumb.jpg","keywords":["Invoke-RestMethod","PowerShell","regex","Regular Expressions","Scripting","Sysinternals"],"articleSection":["PowerShell","Powershell 3.0","Scripting"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/jdhitsolutions.com\/blog\/powershell\/3881\/scraping-sysinternals\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/3881\/scraping-sysinternals\/","url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/3881\/scraping-sysinternals\/","name":"Scraping Sysinternals &#8226; The Lonely Administrator","isPartOf":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/3881\/scraping-sysinternals\/#primaryimage"},"image":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/3881\/scraping-sysinternals\/#primaryimage"},"thumbnailUrl":"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2014\/06\/download-thumb.jpg","datePublished":"2014-06-16T15:32:06+00:00","dateModified":"2015-06-21T16:25:11+00:00","breadcrumb":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/3881\/scraping-sysinternals\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/jdhitsolutions.com\/blog\/powershell\/3881\/scraping-sysinternals\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/3881\/scraping-sysinternals\/#primaryimage","url":"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2014\/06\/download-thumb.jpg","contentUrl":"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2014\/06\/download-thumb.jpg"},{"@type":"BreadcrumbList","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/3881\/scraping-sysinternals\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"PowerShell","item":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell\/"},{"@type":"ListItem","position":2,"name":"Scraping Sysinternals"}]},{"@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":4895,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4895\/friday-fun-a-sysinternals-powershell-workflow\/","url_meta":{"origin":3881,"position":0},"title":"Friday Fun: A SysInternals PowerShell Workflow","author":"Jeffery Hicks","date":"February 12, 2016","format":false,"excerpt":"Over the years I've come up with a number of PowerShell tools to download the SysInternals tools to my desktop. And yes, I know that with PowerShell 5 and PowerShellGet I could download and install a SysInternals package. But that assumes the package is current.\u00a0 But that's not really the\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\/02\/image_thumb-5.png?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2016\/02\/image_thumb-5.png?resize=350%2C200 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2016\/02\/image_thumb-5.png?resize=525%2C300 1.5x"},"classes":[]},{"id":3140,"url":"https:\/\/jdhitsolutions.com\/blog\/scripting\/3140\/friday-fun-quote-of-the-day-revised\/","url_meta":{"origin":3881,"position":1},"title":"Friday Fun: Quote of the Day Revised","author":"Jeffery Hicks","date":"June 28, 2013","format":false,"excerpt":"This week TrainSignal has been running a contest to celebrate my new PowerShell 3.0 course . All you have to do to win is enter some off-the-wall, silly or non-production use of PowerShell. I've posted a few examples on the TrainSignal blog this week. \u00a0These Friday Fun posts I write\u2026","rel":"","context":"In &quot;Friday Fun&quot;","block_context":{"text":"Friday Fun","link":"https:\/\/jdhitsolutions.com\/blog\/category\/friday-fun\/"},"img":{"alt_text":"talkbubble-v3","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2012\/05\/talkbubble-v3-150x150.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":4222,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4222\/baby-its-cold-outside\/","url_meta":{"origin":3881,"position":2},"title":"Baby, It&#8217;s Cold Outside","author":"Jeffery Hicks","date":"February 16, 2015","format":false,"excerpt":"I don't know about your neck of the woods, but it is downright Arctic here. So I thought I'd polish up my PowerShell function to get weather data. #requires -version 3.0 Function Get-MyWeather { <# .Synopsis Get the weather for a US zip code .Description This command will query the\u2026","rel":"","context":"In &quot;PowerShell&quot;","block_context":{"text":"PowerShell","link":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell\/"},"img":{"alt_text":"weather","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2015\/02\/weather-300x138.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":9130,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/9130\/configure-sysinternals-eula-acceptance\/","url_meta":{"origin":3881,"position":3},"title":"Configure SysInternals EULA Acceptance","author":"Jeffery Hicks","date":"August 24, 2022","format":false,"excerpt":"I just saw a very, very handy thing on Twitter where you can set a registry key that will automatically accept all EULA prompts for the SysInternals tools. I know there is a command-line switch I can use, but I never remember to use it. Setting the registry key appears\u2026","rel":"","context":"In &quot;PowerShell&quot;","block_context":{"text":"PowerShell","link":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3627,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/3627\/friday-fun-with-rest-regex-and-replacements\/","url_meta":{"origin":3881,"position":4},"title":"Friday Fun with REST, Regex and Replacements","author":"Jeffery Hicks","date":"January 24, 2014","format":false,"excerpt":"I just love using the web cmdlets that were introduced in PowerShell 3.0. One of the cmdlets I use the most is Invoke-RESTMethod. This isn't because I'm dealing with sites that offer REST-ful services, but rather I like that the cmdlet does all the heavy lifting for me when I\u2026","rel":"","context":"In &quot;Friday Fun&quot;","block_context":{"text":"Friday Fun","link":"https:\/\/jdhitsolutions.com\/blog\/category\/friday-fun\/"},"img":{"alt_text":"computereye","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2012\/04\/computereye-150x150.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":3510,"url":"https:\/\/jdhitsolutions.com\/blog\/scripting\/3510\/out-with-the-windows-old\/","url_meta":{"origin":3881,"position":5},"title":"Out with the Windows.old","author":"Jeffery Hicks","date":"October 23, 2013","format":false,"excerpt":"Over the last few days I've started the process of upgrading my test virtual machines to Windows Server 2012 R2, or in the case of my mini Hyper-V server, to the final bits of Windows Hyper-V Server 2012 R2. In many cases I had been running the preview bits. I\u2026","rel":"","context":"In &quot;CommandLine&quot;","block_context":{"text":"CommandLine","link":"https:\/\/jdhitsolutions.com\/blog\/category\/commandline\/"},"img":{"alt_text":"over-the-hill","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/10\/over-the-hill.png?resize=350%2C200","width":350,"height":200},"classes":[]}],"_links":{"self":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/3881","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=3881"}],"version-history":[{"count":0,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/3881\/revisions"}],"wp:attachment":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=3881"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=3881"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=3881"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}