{"id":2072,"date":"2012-02-07T10:42:03","date_gmt":"2012-02-07T15:42:03","guid":{"rendered":"http:\/\/jdhitsolutions.com\/blog\/?p=2072"},"modified":"2012-02-07T10:42:03","modified_gmt":"2012-02-07T15:42:03","slug":"ping-a-service-with-powershell","status":"publish","type":"post","link":"https:\/\/jdhitsolutions.com\/blog\/powershell\/2072\/ping-a-service-with-powershell\/","title":{"rendered":"Ping a Service with PowerShell"},"content":{"rendered":"<p>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, or at least reachable. It is not difficult to use Get-Service, or even WMI, to connect to a service on a remote machine. But I thought it might be nice to have a few extras so I came up with Ping-Service.<\/p>\n<p>I suppose I could have called it Test-Service, but I liked the idea of pinging a service. Let me layout the core part then I'll touch on a few parts.<\/p>\n<p><code lang=\"PowerShell\"><br \/>\nFunction Ping-Service {<\/p>\n<p>[cmdletbinding()]<\/p>\n<p>Param(<br \/>\n[Parameter(Position=0,Mandatory=$True,HelpMessage=\"Enter the name of a service\")]<br \/>\n[ValidateNotNullorEmpty()]<br \/>\n[string]$Name,<\/p>\n<p>[Parameter(Position=1,ValuefromPipeline=$True)]<br \/>\n[ValidateNotNullorEmpty()]<br \/>\n[string[]]$Computername=$env:computername,<\/p>\n<p>[switch]$Quiet<br \/>\n)<\/p>\n<p>Begin {<br \/>\n    Write-Verbose \"Starting $($myinvocation.mycommand)\"<br \/>\n    Write-Verbose \"Pinging service $name\"<br \/>\n}<\/p>\n<p>Process {<br \/>\n Foreach ($computer in $computername) {<br \/>\n     Write-Verbose \"Testing computer $computer\"<\/p>\n<p>    #get service from each computer<br \/>\n    $measure=Measure-Command {$service=Get-Service -Name $Name -ComputerName $Computer -ErrorAction SilentlyContinue -ErrorVariable ev}<br \/>\n    $end=Get-Date<\/p>\n<p>    if ($Quiet -and $service.status -eq \"Running\") {<br \/>\n        #if quiet only return True if service is running<br \/>\n        Write-Output $True<br \/>\n    }<br \/>\n    elseif ($Quiet) {<br \/>\n        #status is something other than Running<br \/>\n        Write-Output $False<br \/>\n    }<br \/>\n    elseif ($ev) {<br \/>\n        $msg=\"Error with {0} service on {1}. {2}\" -f $Name,$Computer,$ev[0].Exception.message<br \/>\n        Write-Verbose $msg<br \/>\n        Remove-Variable ev<\/p>\n<p>        New-Object -TypeName PSObject -Property @{<br \/>\n         Time=(Get-Date -displayhint Time);<br \/>\n         Computername=$Computer;<br \/>\n         Name=$name;<br \/>\n         Displayname=$null;<br \/>\n         Status=\"Unknown\";<br \/>\n         Response=$measure.TotalMilliseconds;<br \/>\n         Reply=$False<br \/>\n        } | Select Time,Computername,Name,Displayname,Status,Response,Reply<br \/>\n    }<br \/>\n    else {<br \/>\n        #otherwise, return a custom object<br \/>\n        $service | Select @{Name=\"Time\";Expression={(Get-Date -displayhint Time)}},<br \/>\n        @{Name=\"Computername\";Expression={$_.Machinename}},<br \/>\n        Name,Displayname,Status,<br \/>\n        @{Name=\"Response\";Expression={$measure.TotalMilliseconds}},<br \/>\n        @{Name=\"Reply\";Expression={<br \/>\n          if ($_.Status -eq \"Running\") {$True} else {$False}<br \/>\n        }}<br \/>\n     }<br \/>\n  } #foreach<br \/>\n}<\/p>\n<p>End {<br \/>\n    Write-Verbose \"Ending $($myinvocation.mycommand)\"<br \/>\n}<\/p>\n<p>} #function<br \/>\n<\/code><\/p>\n<p>The function takes service and computer names as parameters. You have specify a service name but the computername defaults to the local computer. By default the function writes a custom object to the pipeline which I'll get to in a moment. But you can also use -Quiet which will return True if the service is running and false for anything else, including errors connecting to the service or computer. This allows you to use the command in an If statement.<\/p>\n<p><code lang=\"DOS\"><br \/>\nPS C:\\> if (ping-service wuauserv -comp Quark -quiet) {\"ok\"} else {\"down\"}<br \/>\n<\/code><\/p>\n<p>You can pipe computernames to the function but you have to test for the same service on each. I figured this was the most likely usage scenario. I decided to use Get-Service instead of Get-WMIObject. True, WMI can return a bit more information, but I've always found WMI has a bit more overhead and Get-Service runs a little quicker.<\/p>\n<p><code lang=\"PowerShell\"><br \/>\n    $service=Get-Service -Name $Name -ComputerName $Computer -ErrorAction SilentlyContinue -ErrorVariable ev<br \/>\n<\/code><\/p>\n<p>Normally, I would do something like is in a Try\/Catch block. But instead I want the function to keep going which is why I set the erroraction parameter to SilentlyContinue. But, if an exception occurred, I can store it in $ev. Now I have something I can test for later in the function.<\/p>\n<p><code lang=\"PowerShell\"><br \/>\nelseif ($ev) {<br \/>\n  $msg=\"Error with {0} service on {1}. {2}\" -f $Name,$Computer,$ev[0].Exception.message<br \/>\n  Write-Verbose $msg<br \/>\n<\/code><\/p>\n<p>Assuming I get a response and I didn't specify -Quiet, then a custom object is written to the pipeline with service information, a time span that shows how long the Get-Service command took to complete and a boolean indicating if there was a \"reply\".<\/p>\n<p><code><br \/>\nTime         : 2\/7\/2012 10:32:05 AM<br \/>\nComputername : jdhit-dc01<br \/>\nName         : wuauserv<br \/>\nDisplayName  : Automatic Updates<br \/>\nStatus       : Running<br \/>\nResponse     : 4.4942<br \/>\nReply        : True<br \/>\n<\/code><\/p>\n<p>The function allows me to run expressions like this:<\/p>\n<p><code lang=\"DOS\"><br \/>\nPS C:\\> \"serenity\",\"jdhit-dc01\",\"quark\" | ping-service wuauserv | Where {!$_.Reply} | Select Computername,Status,Reply <\/p>\n<p>Computername      Status       Reply<br \/>\n------------      ------       -----<br \/>\nquark             Unknown      False<br \/>\n<\/code><\/p>\n<p>Download <a href='http:\/\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2012\/02\/Ping-Service.txt' target='_blank'>Ping-Service<\/a> and let me know what you think.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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 &#8220;ping&#8221; a service, in much the same way we ping a computer to see if it is up and running, or at least reachable. It&#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],"tags":[308,534,540,141],"class_list":["post-2072","post","type-post","status-publish","format-standard","hentry","category-powershell","category-scripting","tag-get-service","tag-powershell","tag-scripting","tag-services"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Ping a Service with PowerShell &#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\/2072\/ping-a-service-with-powershell\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Ping a Service with PowerShell &#8226; The Lonely Administrator\" \/>\n<meta property=\"og:description\" content=\"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 &quot;ping&quot; a service, in much the same way we ping a computer to see if it is up and running, or at least reachable. It...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/jdhitsolutions.com\/blog\/powershell\/2072\/ping-a-service-with-powershell\/\" \/>\n<meta property=\"og:site_name\" content=\"The Lonely Administrator\" \/>\n<meta property=\"article:published_time\" content=\"2012-02-07T15:42:03+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=\"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\\\/2072\\\/ping-a-service-with-powershell\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/2072\\\/ping-a-service-with-powershell\\\/\"},\"author\":{\"name\":\"Jeffery Hicks\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"headline\":\"Ping a Service with PowerShell\",\"datePublished\":\"2012-02-07T15:42:03+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/2072\\\/ping-a-service-with-powershell\\\/\"},\"wordCount\":386,\"commentCount\":4,\"publisher\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/d0258030b41f07fd745f4078bdf5b6c9\"},\"keywords\":[\"Get-Service\",\"PowerShell\",\"Scripting\",\"services\"],\"articleSection\":[\"PowerShell\",\"Scripting\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/2072\\\/ping-a-service-with-powershell\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/2072\\\/ping-a-service-with-powershell\\\/\",\"url\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/2072\\\/ping-a-service-with-powershell\\\/\",\"name\":\"Ping a Service with PowerShell &#8226; The Lonely Administrator\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/#website\"},\"datePublished\":\"2012-02-07T15:42:03+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/2072\\\/ping-a-service-with-powershell\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/2072\\\/ping-a-service-with-powershell\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/powershell\\\/2072\\\/ping-a-service-with-powershell\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"PowerShell\",\"item\":\"https:\\\/\\\/jdhitsolutions.com\\\/blog\\\/category\\\/powershell\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Ping a Service with PowerShell\"}]},{\"@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":"Ping a Service with PowerShell &#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\/2072\/ping-a-service-with-powershell\/","og_locale":"en_US","og_type":"article","og_title":"Ping a Service with PowerShell &#8226; The Lonely Administrator","og_description":"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, or at least reachable. It...","og_url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/2072\/ping-a-service-with-powershell\/","og_site_name":"The Lonely Administrator","article_published_time":"2012-02-07T15:42:03+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":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/2072\/ping-a-service-with-powershell\/#article","isPartOf":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/2072\/ping-a-service-with-powershell\/"},"author":{"name":"Jeffery Hicks","@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"headline":"Ping a Service with PowerShell","datePublished":"2012-02-07T15:42:03+00:00","mainEntityOfPage":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/2072\/ping-a-service-with-powershell\/"},"wordCount":386,"commentCount":4,"publisher":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#\/schema\/person\/d0258030b41f07fd745f4078bdf5b6c9"},"keywords":["Get-Service","PowerShell","Scripting","services"],"articleSection":["PowerShell","Scripting"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/jdhitsolutions.com\/blog\/powershell\/2072\/ping-a-service-with-powershell\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/2072\/ping-a-service-with-powershell\/","url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/2072\/ping-a-service-with-powershell\/","name":"Ping a Service with PowerShell &#8226; The Lonely Administrator","isPartOf":{"@id":"https:\/\/jdhitsolutions.com\/blog\/#website"},"datePublished":"2012-02-07T15:42:03+00:00","breadcrumb":{"@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/2072\/ping-a-service-with-powershell\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/jdhitsolutions.com\/blog\/powershell\/2072\/ping-a-service-with-powershell\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/jdhitsolutions.com\/blog\/powershell\/2072\/ping-a-service-with-powershell\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"PowerShell","item":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell\/"},{"@type":"ListItem","position":2,"name":"Ping a Service with PowerShell"}]},{"@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":2072,"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":2072,"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":2206,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/2206\/powershell-scripting-with-validateset\/","url_meta":{"origin":2072,"position":2},"title":"PowerShell Scripting with [ValidateSet]","author":"Jeffery Hicks","date":"April 16, 2012","format":false,"excerpt":"Today we'll continue our exploration of the parameter validation attributes you can use in you PowerShell scripting. We've already looked at [ValidateRange] and [ValidateScript]. Another attribute you are likely to use is [ValidateSet()]. You can use this to verify that the parameter value belongs to a pre-defined set. To use,\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":4018,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/4018\/more-powershell-toolmaking-fun\/","url_meta":{"origin":2072,"position":3},"title":"More PowerShell Toolmaking Fun","author":"Jeffery Hicks","date":"September 15, 2014","format":false,"excerpt":"I am having so much fun making my own PowerShell tools that I just can't stop. I've been using my Get-Commandmetadata function that I wrote about a few weeks ago. A driving force in all of this is to have a toolset that I can use efficiently from the console.\u2026","rel":"","context":"In &quot;PowerShell&quot;","block_context":{"text":"PowerShell","link":"https:\/\/jdhitsolutions.com\/blog\/category\/powershell\/"},"img":{"alt_text":"blacksmith","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2014\/09\/blacksmith.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":1923,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/1923\/send-powershell-reports-by-mail\/","url_meta":{"origin":2072,"position":4},"title":"Send PowerShell Reports by Mail","author":"Jeffery Hicks","date":"December 29, 2011","format":false,"excerpt":"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\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\/12\/html-mail-300x192.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":7700,"url":"https:\/\/jdhitsolutions.com\/blog\/powershell\/7700\/active-directory-objects-and-the-powershell-pipeline\/","url_meta":{"origin":2072,"position":5},"title":"Active Directory Objects and the PowerShell Pipeline","author":"Jeffery Hicks","date":"September 28, 2020","format":false,"excerpt":"This article is something I've been meaning to write for sometime. As often as I tell people PowerShell is easy to use once you understand its core concepts, that isn't always the case.\u00a0 This is a problem my friend Gladys Kravitz brought to my attention some time ago. Like her,\u2026","rel":"","context":"In &quot;Active Directory&quot;","block_context":{"text":"Active Directory","link":"https:\/\/jdhitsolutions.com\/blog\/category\/active-directory\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/09\/Get-bits-revised-ad.jpg?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/09\/Get-bits-revised-ad.jpg?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/09\/Get-bits-revised-ad.jpg?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/09\/Get-bits-revised-ad.jpg?resize=700%2C400&ssl=1 2x, https:\/\/i0.wp.com\/jdhitsolutions.com\/blog\/wp-content\/uploads\/2020\/09\/Get-bits-revised-ad.jpg?resize=1050%2C600&ssl=1 3x"},"classes":[]}],"_links":{"self":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/2072","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=2072"}],"version-history":[{"count":0,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/2072\/revisions"}],"wp:attachment":[{"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=2072"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=2072"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jdhitsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=2072"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}