{"id":3093,"date":"2013-06-07T09:39:22","date_gmt":"2013-06-07T13:39:22","guid":{"rendered":"http:\/\/jdhitsolutions.com\/blog\/?p=3093"},"modified":"2013-06-07T09:39:22","modified_gmt":"2013-06-07T13:39:22","slug":"friday-fun-its-powershell-baby","status":"publish","type":"post","link":"https:\/\/jdhitsolutions.com\/blog\/scripting\/3093\/friday-fun-its-powershell-baby\/","title":{"rendered":"Friday Fun: It&#8217;s PowerShell, Baby!"},"content":{"rendered":"<p><a href=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/06\/baby.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-thumbnail wp-image-3094\" alt=\"baby\" src=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/06\/baby-150x150.png\" width=\"150\" height=\"150\" \/><\/a> The other day I received an email looking for guidance on using Invoke-Webrequest to pull data from a table on a web page. Specifically, he wanted to get the list of popular baby names from <a href=\"http:\/\/www.ssa.gov\/OACT\/babynames\/index.html\" target=\"_blank\">http:\/\/www.ssa.gov\/OACT\/babynames\/index.html<\/a>. I gave him some quick tips but figured this would also be another teaching opportunity. Using Invoke-Webrequest with PowerShell 3 is a fantastic way to incorporate Web-based data into your PowerShell session. However, I have yet to devise tools for working with web data that work in every case. I think what you'll find is that each site needs to be handled a bit differently. So here's how I worked through this problem and I think some of the techniques will work for other sites.<\/p>\n<p>The challenge I gave myself was to get data from a table and turn it into PowerShell objects. When you run Invoke-Webrequest from the PowerShell console (don't use the ISE), you'll get a property of ParsedHTML. With this property you can use the Microsoft DOM (document object model) to parse out data. I'll admit I'm still a neophyte when it comes to working with DOM, but I'm getting there. Anyway...in looking at the page source, which you can do in any browser, I learned that the table I wanted was the first one in the page. So let's start getting some PowerShell results.<\/p>\n<pre class=\"font:courier-new lang:ps decode:true\">$uri = \"http:\/\/www.ssa.gov\/OACT\/babynames\/index.html\"\r\n\r\n#get the data\r\n$data = Invoke-WebRequest $uri\r\n\r\n#get the first table\r\n$table = $data.ParsedHtml.getElementsByTagName(\"table\") | Select -first 1<\/pre>\n<p>I used the GetElementsByTagName method from the DOM to retrieve all tables and then selected the first one.  The table object has some text properties that I could have tried to parse out, but I decided to take a different approach. The table contains rows, which I can get.<\/p>\n<pre class=\"font:courier-new lang:ps decode:true \" >#get the rows\r\n$rows = $table.rows<\/pre>\n<p>The first item in the collection of rows will be the table header. This data will become my object properties.<\/p>\n<pre class=\"font:courier-new lang:ps decode:true \" >#get table headers\r\n$headers = $rows.item(0).children | select -ExpandProperty InnerText\r\n<\/pre>\n<p>Now, $headers is an array of strings from each table column. Now the tricky part and there are probably several ways you could approach this. I need to go through the remaining table rows and match up each column with the header and eventually create a custom object. I decided to use a For enumeration to go through each row and then within each row enumerate again using the headers and add each entry into a hash table, which I can eventually turn into a custom object.<\/p>\n<pre class=\"font:courier-new lang:ps decode:true \" >#count number of rows\r\n$NumOfRows = $rows | Measure-Object\r\n\r\n#enumerate the remaining rows (skipping the header row) and create a custom object\r\nfor ($i=1;$i -lt $NumofRows.Count;$i++) {\r\n #define an empty hashtable\r\n $objHash=[ordered]@{}\r\n #get the child rows\r\n $rowdata = $rows.item($i).children | select -ExpandProperty InnerText \r\n for ($j=0;$j -lt $headers.count;$j++) {\r\n    #add each row of data to the hash table using the corresponding\r\n    #table header value\r\n    $objHash.Add($headers[$j],$rowdata[$j])\r\n  } #for\r\n\r\n  #turn the hashtable into a custom object\r\n  [pscustomobject]$objHash\r\n} #for<\/pre>\n<p>Here's the result.<br \/>\n<a href=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/06\/get-babynames.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/06\/get-babynames-1024x336.png\" alt=\"get-babynames\" width=\"625\" height=\"205\" class=\"aligncenter size-large wp-image-3095\" srcset=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/06\/get-babynames-1024x336.png 1024w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/06\/get-babynames-300x98.png 300w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/06\/get-babynames-624x204.png 624w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/06\/get-babynames.png 1030w\" sizes=\"auto, (max-width: 625px) 100vw, 625px\" \/><\/a><\/p>\n<p>Because my script is writing an object to the pipeline I can also do things such as sort and select.<\/p>\n<p><a href=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/06\/get-babynames2.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/06\/get-babynames2-1024x285.png\" alt=\"get-babynames2\" width=\"625\" height=\"173\" class=\"aligncenter size-large wp-image-3096\" srcset=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/06\/get-babynames2-1024x285.png 1024w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/06\/get-babynames2-300x83.png 300w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/06\/get-babynames2-624x173.png 624w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/06\/get-babynames2.png 1026w\" sizes=\"auto, (max-width: 625px) 100vw, 625px\" \/><\/a><\/p>\n<p>I can't guarantee this code will handle every single table you come across, but it might get you started and you can always ask for help in the forums at <a href=\"http:\/\/PowerShell.org\" title=\"Visit THE site for PowerShell\" target=\"_blank\">PowerShell.org<\/a>. If you are looking for more examples with Invoke-WebRequest you might also take a look at <a href=\"http:\/\/jdhitsolutions.com\/blog\/2013\/03\/friday-fun-get-beer-list\/\" title=\"See What's Brewing\" target=\"_blank\">Get Beer List<\/a> and <a href=\"http:\/\/jdhitsolutions.com\/blog\/2013\/06\/browse-trainsignal-courses-with-powershell\/\" title=\"Browse Trainsignal courses with PowerShell\" target=\"_blank\">Browsing Trainsignal Courses<\/a>.<\/p>\n<p>Enjoy!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The other day I received an email looking for guidance on using Invoke-Webrequest to pull data from a table on a web page. Specifically, he wanted to get the list of popular baby names from http:\/\/www.ssa.gov\/OACT\/babynames\/index.html. I gave him some quick tips but figured this would also be another teaching opportunity. Using Invoke-Webrequest with PowerShell&#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":"New post - Friday Fun: It's #PowerShell, Baby!","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":[271,359,8],"tags":[410,534,540],"class_list":["post-3093","post","type-post","status-publish","format-standard","hentry","category-friday-fun","category-powershell-3-0","category-scripting","tag-invoke-webrequest","tag-powershell","tag-scripting"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Friday Fun: It&#039;s PowerShell, Baby! &#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\/scripting\/3093\/friday-fun-its-powershell-baby\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Friday Fun: It&#039;s PowerShell, Baby! &#8226; The Lonely Administrator\" \/>\n<meta property=\"og:description\" content=\"The other day I received an email looking for guidance on using Invoke-Webrequest to pull data from a table on a web page. Specifically, he wanted to get the list of popular baby names from http:\/\/www.ssa.gov\/OACT\/babynames\/index.html. I gave him some quick tips but figured this would also be another teaching opportunity. Using Invoke-Webrequest with PowerShell...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/jdhitsolutions.com\/blog\/scripting\/3093\/friday-fun-its-powershell-baby\/\" \/>\n<meta property=\"og:site_name\" content=\"The Lonely Administrator\" \/>\n<meta property=\"article:published_time\" content=\"2013-06-07T13:39:22+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/06\/baby-150x150.png\" \/>\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=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/scripting\\\/3093\\\/friday-fun-its-powershell-baby\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/scripting\\\/3093\\\/friday-fun-its-powershell-baby\\\/\"},\"author\":{\"name\":\"Jeffery Hicks\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"headline\":\"Friday Fun: It&#8217;s PowerShell, Baby!\",\"datePublished\":\"2013-06-07T13:39:22+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/scripting\\\/3093\\\/friday-fun-its-powershell-baby\\\/\"},\"wordCount\":482,\"commentCount\":2,\"publisher\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"image\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/scripting\\\/3093\\\/friday-fun-its-powershell-baby\\\/#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2013\\\/06\\\/baby-150x150.png\",\"keywords\":[\"Invoke-WebRequest\",\"PowerShell\",\"Scripting\"],\"articleSection\":[\"Friday Fun\",\"Powershell 3.0\",\"Scripting\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/scripting\\\/3093\\\/friday-fun-its-powershell-baby\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/scripting\\\/3093\\\/friday-fun-its-powershell-baby\\\/\",\"url\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/scripting\\\/3093\\\/friday-fun-its-powershell-baby\\\/\",\"name\":\"Friday Fun: It's PowerShell, Baby! &#8226; The Lonely Administrator\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/scripting\\\/3093\\\/friday-fun-its-powershell-baby\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/scripting\\\/3093\\\/friday-fun-its-powershell-baby\\\/#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2013\\\/06\\\/baby-150x150.png\",\"datePublished\":\"2013-06-07T13:39:22+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/scripting\\\/3093\\\/friday-fun-its-powershell-baby\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/scripting\\\/3093\\\/friday-fun-its-powershell-baby\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/scripting\\\/3093\\\/friday-fun-its-powershell-baby\\\/#primaryimage\",\"url\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2013\\\/06\\\/baby.png\",\"contentUrl\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2013\\\/06\\\/baby.png\",\"width\":587,\"height\":817},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/scripting\\\/3093\\\/friday-fun-its-powershell-baby\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Friday Fun\",\"item\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/category\\\/friday-fun\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Friday Fun: It&#8217;s PowerShell, Baby!\"}]},{\"@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: It's PowerShell, Baby! &#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\/scripting\/3093\/friday-fun-its-powershell-baby\/","og_locale":"en_US","og_type":"article","og_title":"Friday Fun: It's PowerShell, Baby! &#8226; The Lonely Administrator","og_description":"The other day I received an email looking for guidance on using Invoke-Webrequest to pull data from a table on a web page. Specifically, he wanted to get the list of popular baby names from http:\/\/www.ssa.gov\/OACT\/babynames\/index.html. I gave him some quick tips but figured this would also be another teaching opportunity. Using Invoke-Webrequest with PowerShell...","og_url":"https:\/\/jdhitsolutions.com\/blog\/scripting\/3093\/friday-fun-its-powershell-baby\/","og_site_name":"The Lonely Administrator","article_published_time":"2013-06-07T13:39:22+00:00","og_image":[{"url":"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/06\/baby-150x150.png","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":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/jdhitsolutions.com\/blog\/scripting\/3093\/friday-fun-its-powershell-baby\/#article","isPartOf":{"@id":"https:\/\/jdhitsolutions.com\/blog\/scripting\/3093\/friday-fun-its-powershell-baby\/"},"author":{"name":"Jeffery Hicks","@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"headline":"Friday Fun: It&#8217;s PowerShell, Baby!","datePublished":"2013-06-07T13:39:22+00:00","mainEntityOfPage":{"@id":"https:\/\/jdhitsolutions.com\/blog\/scripting\/3093\/friday-fun-its-powershell-baby\/"},"wordCount":482,"commentCount":2,"publisher":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"image":{"@id":"https:\/\/jdhitsolutions.com\/blog\/scripting\/3093\/friday-fun-its-powershell-baby\/#primaryimage"},"thumbnailUrl":"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/06\/baby-150x150.png","keywords":["Invoke-WebRequest","PowerShell","Scripting"],"articleSection":["Friday Fun","Powershell 3.0","Scripting"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/jdhitsolutions.com\/blog\/scripting\/3093\/friday-fun-its-powershell-baby\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/jdhitsolutions.com\/blog\/scripting\/3093\/friday-fun-its-powershell-baby\/","url":"https:\/\/jdhitsolutions.com\/blog\/scripting\/3093\/friday-fun-its-powershell-baby\/","name":"Friday Fun: It's PowerShell, Baby! &#8226; The Lonely Administrator","isPartOf":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/jdhitsolutions.com\/blog\/scripting\/3093\/friday-fun-its-powershell-baby\/#primaryimage"},"image":{"@id":"https:\/\/jdhitsolutions.com\/blog\/scripting\/3093\/friday-fun-its-powershell-baby\/#primaryimage"},"thumbnailUrl":"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/06\/baby-150x150.png","datePublished":"2013-06-07T13:39:22+00:00","breadcrumb":{"@id":"https:\/\/jdhitsolutions.com\/blog\/scripting\/3093\/friday-fun-its-powershell-baby\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/jdhitsolutions.com\/blog\/scripting\/3093\/friday-fun-its-powershell-baby\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/jdhitsolutions.com\/blog\/scripting\/3093\/friday-fun-its-powershell-baby\/#primaryimage","url":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/06\/baby.png","contentUrl":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/06\/baby.png","width":587,"height":817},{"@type":"BreadcrumbList","@id":"https:\/\/jdhitsolutions.com\/blog\/scripting\/3093\/friday-fun-its-powershell-baby\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Friday Fun","item":"https:\/\/jdhitsolutions.com\/blog\/category\/friday-fun\/"},{"@type":"ListItem","position":2,"name":"Friday Fun: It&#8217;s PowerShell, Baby!"}]},{"@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":3455,"url":"https:\/\/jdhitsolutions.com\/blog\/scripting\/3455\/friday-fun-color-my-web\/","url_meta":{"origin":3093,"position":0},"title":"Friday Fun Color My Web","author":"Jeffery Hicks","date":"September 20, 2013","format":false,"excerpt":"Awhile ago I posted an article demonstrating using Invoke-Webrequest which is part of PowerShell 3.0. I used the page at Manning.com to display the Print and MEAP bestsellers. By the way, thanks to all of you who keep making PowerShell books popular. My original script simply wrote the results to\u2026","rel":"","context":"In &quot;Books&quot;","block_context":{"text":"Books","link":"https:\/\/jdhitsolutions.com\/blog\/category\/books\/"},"img":{"alt_text":"get-manningbestseller1","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/09\/get-manningbestseller1-1024x606.png?resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/09\/get-manningbestseller1-1024x606.png?resize=350%2C200 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/09\/get-manningbestseller1-1024x606.png?resize=525%2C300 1.5x"},"classes":[]},{"id":4342,"url":"https:\/\/jdhitsolutions.com\/blog\/friday-fun\/4342\/friday-fun-whats-my-ip\/","url_meta":{"origin":3093,"position":1},"title":"Friday Fun: What&#8217;s My IP","author":"Jeffery Hicks","date":"April 3, 2015","format":false,"excerpt":"Today's Friday Fun is a \"quick and dirty\" solution to the question, \"What is my public IP address?\" There are plenty of web sites and services you can visit that will display that piece of information. Naturally I want an easy way to get this in PowerShell. Recently I came\u2026","rel":"","context":"In &quot;Friday Fun&quot;","block_context":{"text":"Friday Fun","link":"https:\/\/jdhitsolutions.com\/blog\/category\/friday-fun\/"},"img":{"alt_text":"getmyip","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2015\/04\/getmyip-1024x345.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":2639,"url":"https:\/\/jdhitsolutions.com\/blog\/friday-fun\/2639\/friday-fun-scraping-the-web-with-powershell-v3\/","url_meta":{"origin":3093,"position":2},"title":"Friday Fun: Scraping the Web with PowerShell v3","author":"Jeffery Hicks","date":"December 21, 2012","format":false,"excerpt":"We often think about PowerShell v3 as being a management tool for the cloud. One new PowerShell v3 cmdlet that lends substance to this idea is Invoke-WebRequest. This is a handy for retrieving data from a web site resource. It might be a public web site or something on your\u2026","rel":"","context":"In &quot;Friday Fun&quot;","block_context":{"text":"Friday Fun","link":"https:\/\/jdhitsolutions.com\/blog\/category\/friday-fun\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3084,"url":"https:\/\/jdhitsolutions.com\/blog\/training\/3084\/browse-trainsignal-courses-with-powershell\/","url_meta":{"origin":3093,"position":3},"title":"Browse TrainSignal Courses with PowerShell","author":"Jeffery Hicks","date":"June 5, 2013","format":false,"excerpt":"It took longer than I expected, but my latest course for TrainSignal is now available. PowerShell v3 Essentials is targeted for IT Pros with little to no PowerShell experience. This is the course that will get you up and running in short order. I developed the course so that an\u2026","rel":"","context":"In &quot;Powershell 3.0&quot;","block_context":{"text":"Powershell 3.0","link":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell-3-0\/"},"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":2841,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/2841\/friday-fun-get-beer-list\/","url_meta":{"origin":3093,"position":4},"title":"Friday Fun Get Beer List","author":"Jeffery Hicks","date":"March 8, 2013","format":false,"excerpt":"Well, another Friday and what goes better with it than beer. Of course I should mix in a little PowerShell as well. I live in the Syracuse, NY area and we have a terrific local brewery, Middle Ages Brewing Company. Not only is there a tasting room, but I can\u2026","rel":"","context":"In &quot;Friday Fun&quot;","block_context":{"text":"Friday Fun","link":"https:\/\/jdhitsolutions.com\/blog\/category\/friday-fun\/"},"img":{"alt_text":"beer","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2013\/03\/beer-150x150.jpg?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":4529,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4529\/whats-the-weather\/","url_meta":{"origin":3093,"position":5},"title":"What\u2019s the Weather?","author":"Jeffery Hicks","date":"September 23, 2015","format":false,"excerpt":"I have used a PowerShell module I wrote a while ago to retrieve weather information from Yahoo.com. Yahoo offers a set of web APIs which are free to use, that will provide weather information for a given location. The location is determined by a \"Where On Earth ID\", or woeid.\u2026","rel":"","context":"In &quot;PowerShell&quot;","block_context":{"text":"PowerShell","link":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell\/"},"img":{"alt_text":"clouds","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2015\/09\/092315_1158_WhatstheWea1.png?resize=350%2C200","width":350,"height":200},"classes":[]}],"_links":{"self":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/3093","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=3093"}],"version-history":[{"count":0,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/3093\/revisions"}],"wp:attachment":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=3093"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=3093"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=3093"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}