{"id":1923,"date":"2011-12-29T09:11:53","date_gmt":"2011-12-29T14:11:53","guid":{"rendered":"http:\/\/jdhitsolutions.com\/blog\/?p=1923"},"modified":"2011-12-29T09:11:53","modified_gmt":"2011-12-29T14:11:53","slug":"send-powershell-reports-by-mail","status":"publish","type":"post","link":"https:\/\/jdhitsolutions.com\/blog\/powershell\/1923\/send-powershell-reports-by-mail\/","title":{"rendered":"Send PowerShell Reports by Mail"},"content":{"rendered":"<p>Today I came across a <a href=\"http:\/\/briandesmond.com\/blog\/ping-a-list-of-servers-with-powershell\/\" target=\"_blank\">post <\/a> about pinging a list of computers and send the results as a table via Outlook. Brian is a very smart Active Directory guy so I offered some PowerShell suggestions to make his task even easier. Obviously you can only offer so much in a blog comment, so I thought I'd drop a few more details here.<!--more--><\/p>\n<p>I'm going to follow Brian's original intent, but you can take these ideas and apply them to other tasks you might accomplish in PowerShell. First, let's ping. I prefer to use the Test-Connection cmdlet. The original need was for the host name and its IP address. Assuming local hosts that should be running, I can get by with a command like this\"<\/p>\n<p><code lang=\"PowerShell\"><br \/>\nTest-Connection \"server1\",\"server2\" -count 1<br \/>\n<\/code><\/p>\n<p>This will ping the two servers once. It would be nice if Test-Connection accepted pipelined input by value, but it only does by property name. So to ping a list of computers I can use either of these approaches.<\/p>\n<p><code lang=\"PowerShell\"><br \/>\nget-content computers.txt | foreach { test-connection $_ -count 1}<br \/>\n#or<br \/>\nTest-Connection -computer (get-content computers.txt) -count 1<br \/>\n<\/code><\/p>\n<p>Personally, I find the latter a bit easier. Next we only want certain properties. Piping output to Select * helps me identify the properties.<\/p>\n<p><code lang=\"PowerShell\"><br \/>\nTest-Connection -computer (get-content computers.txt) -count 1 | Select Address,IPv4Address<br \/>\n<\/code><\/p>\n<p>That will be the body of the mail message which we'll send using the Send-MailMessage cmdlet. I intend to send an HTML formatted mail message so I'll take my Test-Connection command and run it through ConvertTo-HTML to create the code.<\/p>\n<p><code lang=\"Powershell\"><br \/>\n[string]$body=Test-Connection -computer (get-content computers.txt) -count 1 | Select Address,IPv4Address | ConvertTo-HTML<br \/>\n<\/code><\/p>\n<p>The body value must be a string so I'm casting $body to treat the output as one long string. Now to send the message.<\/p>\n<p><code lang=\"PowerShell\"><br \/>\nsend-mailmessage -to Administrator@globomantics.local -subject \"Ping Report\" -from \"Jeff@globomantics.local\" -body $body -bodyasHTML -smtpserver chi-ex01.globomantics.local<br \/>\n<\/code><\/p>\n<p>Here's what the email looks like in OWA.<\/p>\n<p><a href=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2011\/12\/html-mail.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2011\/12\/html-mail-300x192.png\" alt=\"\" title=\"html-mail\" width=\"300\" height=\"192\" class=\"aligncenter size-medium wp-image-1924\" srcset=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2011\/12\/html-mail-300x192.png 300w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2011\/12\/html-mail.png 624w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>If I had a network accessible style sheet, I could have included a reference in the HTML code to make it even prettier. But perhaps you don't or can't send HTML. We could go this route.  First, let's get the body text.<\/p>\n<p><code lang=\"PowerShell\"><br \/>\n$body2=test-connection -computer (get-content computers.txt) -count 1 | select Address,IPv4Address<br \/>\n<\/code><\/p>\n<p>Notice I didn't cast $body2 as a string. I wanted the variable to hold the collection of objects. Perhaps I'll want to work with it latter. I'll turn it into a string in the Send-MailMessage command.<\/p>\n<p><code lang=\"PowerShell\"><br \/>\nsend-mailmessage -to Administrator@globomantics.local -subject \"Ping Report\" -from \"Jeff@globomantics.local\" -body ($body2 | out-string) -smtpserver chi-ex01.globomantics.local<br \/>\n<\/code><\/p>\n<p>For the body, I took the variable and piped it to Out-String. Here's the email. It is still a decent looking table.<\/p>\n<p><a href=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2011\/12\/table-mail.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2011\/12\/table-mail-300x130.png\" alt=\"\" title=\"table-mail\" width=\"300\" height=\"130\" class=\"aligncenter size-medium wp-image-1925\" srcset=\"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2011\/12\/table-mail-300x130.png 300w, https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2011\/12\/table-mail.png 636w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Not quite as nice because it doesn't used a fixed width font. But it would do in a pinch. Or I could have saved my ping results to a file and sent it as an attachment. I'll let you figure that out.<\/p>\n<p>If you'd like to see more ways of using PowerShell to build reports or gather data, I hope you'll take a look at my video training course, <a href=\"http:\/\/www.trainsignal.com\/Windows-Server-2008-PowerShell-Training.aspx\" target=\"_blank\">Windows Server 2008 PowerShell Training<\/a> from TrainSignal.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Today I came across a post about pinging a list of computers and send the results as a table via Outlook. Brian is a very smart Active Directory guy so I offered some PowerShell suggestions to make his task even easier. Obviously you can only offer so much in a blog comment, so I thought&#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,318,135],"tags":[348,332,534,540,182,174],"class_list":["post-1923","post","type-post","status-publish","format-standard","hentry","category-powershell","category-scripting","category-train-signal","category-windows-server","tag-mail","tag-ping","tag-powershell","tag-scripting","tag-send-mailmessage","tag-test-connection"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Send PowerShell Reports by Mail &#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\/1923\/send-powershell-reports-by-mail\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Send PowerShell Reports by Mail &#8226; The Lonely Administrator\" \/>\n<meta property=\"og:description\" content=\"Today I came across a post about pinging a list of computers and send the results as a table via Outlook. Brian is a very smart Active Directory guy so I offered some PowerShell suggestions to make his task even easier. Obviously you can only offer so much in a blog comment, so I thought...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/jdhitsolutions.com\/blog\/powershell\/1923\/send-powershell-reports-by-mail\/\" \/>\n<meta property=\"og:site_name\" content=\"The Lonely Administrator\" \/>\n<meta property=\"article:published_time\" content=\"2011-12-29T14:11:53+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2011\/12\/html-mail-300x192.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\\\/powershell\\\/1923\\\/send-powershell-reports-by-mail\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/1923\\\/send-powershell-reports-by-mail\\\/\"},\"author\":{\"name\":\"Jeffery Hicks\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"headline\":\"Send PowerShell Reports by Mail\",\"datePublished\":\"2011-12-29T14:11:53+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/1923\\\/send-powershell-reports-by-mail\\\/\"},\"wordCount\":457,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"image\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/1923\\\/send-powershell-reports-by-mail\\\/#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2011\\\/12\\\/html-mail-300x192.png\",\"keywords\":[\"mail\",\"Ping\",\"PowerShell\",\"Scripting\",\"Send-MailMessage\",\"Test-Connection\"],\"articleSection\":[\"PowerShell\",\"Scripting\",\"Train Signal\",\"Windows Server\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/1923\\\/send-powershell-reports-by-mail\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/1923\\\/send-powershell-reports-by-mail\\\/\",\"url\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/1923\\\/send-powershell-reports-by-mail\\\/\",\"name\":\"Send PowerShell Reports by Mail &#8226; The Lonely Administrator\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/1923\\\/send-powershell-reports-by-mail\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/1923\\\/send-powershell-reports-by-mail\\\/#primaryimage\"},\"thumbnailUrl\":\"http:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2011\\\/12\\\/html-mail-300x192.png\",\"datePublished\":\"2011-12-29T14:11:53+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/1923\\\/send-powershell-reports-by-mail\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/1923\\\/send-powershell-reports-by-mail\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/1923\\\/send-powershell-reports-by-mail\\\/#primaryimage\",\"url\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2011\\\/12\\\/html-mail.png\",\"contentUrl\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2011\\\/12\\\/html-mail.png\",\"width\":\"624\",\"height\":\"401\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/1923\\\/send-powershell-reports-by-mail\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"PowerShell\",\"item\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/category\\\/powershell\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Send PowerShell Reports by Mail\"}]},{\"@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":"Send PowerShell Reports by Mail &#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\/1923\/send-powershell-reports-by-mail\/","og_locale":"en_US","og_type":"article","og_title":"Send PowerShell Reports by Mail &#8226; The Lonely Administrator","og_description":"Today I came across a post about pinging a list of computers and send the results as a table via Outlook. Brian is a very smart Active Directory guy so I offered some PowerShell suggestions to make his task even easier. Obviously you can only offer so much in a blog comment, so I thought...","og_url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/1923\/send-powershell-reports-by-mail\/","og_site_name":"The Lonely Administrator","article_published_time":"2011-12-29T14:11:53+00:00","og_image":[{"url":"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2011\/12\/html-mail-300x192.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\/powershell\/1923\/send-powershell-reports-by-mail\/#article","isPartOf":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/1923\/send-powershell-reports-by-mail\/"},"author":{"name":"Jeffery Hicks","@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"headline":"Send PowerShell Reports by Mail","datePublished":"2011-12-29T14:11:53+00:00","mainEntityOfPage":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/1923\/send-powershell-reports-by-mail\/"},"wordCount":457,"commentCount":1,"publisher":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"image":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/1923\/send-powershell-reports-by-mail\/#primaryimage"},"thumbnailUrl":"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2011\/12\/html-mail-300x192.png","keywords":["mail","Ping","PowerShell","Scripting","Send-MailMessage","Test-Connection"],"articleSection":["PowerShell","Scripting","Train Signal","Windows Server"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/jdhitsolutions.com\/blog\/powershell\/1923\/send-powershell-reports-by-mail\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/1923\/send-powershell-reports-by-mail\/","url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/1923\/send-powershell-reports-by-mail\/","name":"Send PowerShell Reports by Mail &#8226; The Lonely Administrator","isPartOf":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/1923\/send-powershell-reports-by-mail\/#primaryimage"},"image":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/1923\/send-powershell-reports-by-mail\/#primaryimage"},"thumbnailUrl":"http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2011\/12\/html-mail-300x192.png","datePublished":"2011-12-29T14:11:53+00:00","breadcrumb":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/1923\/send-powershell-reports-by-mail\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/jdhitsolutions.com\/blog\/powershell\/1923\/send-powershell-reports-by-mail\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/1923\/send-powershell-reports-by-mail\/#primaryimage","url":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2011\/12\/html-mail.png","contentUrl":"https:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2011\/12\/html-mail.png","width":"624","height":"401"},{"@type":"BreadcrumbList","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/1923\/send-powershell-reports-by-mail\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"PowerShell","item":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell\/"},{"@type":"ListItem","position":2,"name":"Send PowerShell Reports by Mail"}]},{"@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":3830,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/3830\/test-subnet-with-powershell\/","url_meta":{"origin":1923,"position":0},"title":"Test Subnet with PowerShell","author":"Jeffery Hicks","date":"April 25, 2014","format":false,"excerpt":"A few years ago I published a PowerShell function to test IP addresses on a given subnet. I had an email the other day about it and I decided to refresh it. My new version adds a few bells and whistles that I think you might like. For example, you\u2026","rel":"","context":"In &quot;PowerShell&quot;","block_context":{"text":"PowerShell","link":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell\/"},"img":{"alt_text":"keyboardanalyze","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2012\/07\/keyboardanalyze-150x150.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":1738,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/1738\/ping-ip-range\/","url_meta":{"origin":1923,"position":1},"title":"Ping IP Range","author":"Jeffery Hicks","date":"November 7, 2011","format":false,"excerpt":"Last week I came across a post on using PowerShell, or more specifically a .NET Framework class, to ping a range of computers in an IP subnet. The original post by Thomas Maurer is here. I added a comment. And after looking at this again I decided to take the\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":1855,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/1855\/test-subnet-winform\/","url_meta":{"origin":1923,"position":2},"title":"Test-Subnet WinForm","author":"Jeffery Hicks","date":"November 21, 2011","format":false,"excerpt":"Recently, I posted an entry on how to ping an IP subnet with PowerShell. Using objects in the PowerShell pipeline is a good thing. But sometimes we want a GUI and I figured the ping subnet script would make a good WinForm script. When creating graphical PowerShell scripts, I always\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\/11\/subnetpingform-300x178.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":2072,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/2072\/ping-a-service-with-powershell\/","url_meta":{"origin":1923,"position":3},"title":"Ping a Service with PowerShell","author":"Jeffery Hicks","date":"February 7, 2012","format":false,"excerpt":"The other day I came across a PowerShell question on StackOverflow about testing if a service was running on a group of machines.This sparked an idea for a tool to \"ping\" a service, in much the same way we ping a computer to see if it is up and running,\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":6275,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/6275\/powershell-updown-prompt\/","url_meta":{"origin":1923,"position":4},"title":"A PowerShell Up\/Down Prompt","author":"Jeffery Hicks","date":"December 11, 2018","format":false,"excerpt":"It appears many of you are taken with the possibilities of PowerShell prompt functions. In previous posts, I alluded to the fact that you could do just about anything in a prompt function. Today I have an example of what I am talking about. The challenging part of creating a\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\/2018\/12\/image_thumb-7.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2018\/12\/image_thumb-7.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2018\/12\/image_thumb-7.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":1369,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/1369\/scripting-games-2001-beginner-event-5-commentary\/","url_meta":{"origin":1923,"position":5},"title":"Scripting Games 2011 Beginner Event 5 Commentary","author":"Jeffery Hicks","date":"April 25, 2011","format":false,"excerpt":"My commentary for Beginner Event 5 in the 2011 Scripting Games is now available. One item that seems to be missing on the ScriptingGuys site is my complete solution so I thought I would share it here, plus a variation. My sample solution is perhaps a little over-wrought for a\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":[]}],"_links":{"self":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/1923","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=1923"}],"version-history":[{"count":0,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/1923\/revisions"}],"wp:attachment":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=1923"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=1923"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=1923"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}