{"id":1301,"date":"2013-08-31T15:00:45","date_gmt":"2013-08-31T19:00:45","guid":{"rendered":"http:\/\/enterpriseadmins.org\/blog\/?p=1301"},"modified":"2013-08-31T14:13:44","modified_gmt":"2013-08-31T18:13:44","slug":"script-to-ping-a-list-of-computer-names","status":"publish","type":"post","link":"https:\/\/enterpriseadmins.org\/blog\/scripting\/script-to-ping-a-list-of-computer-names\/","title":{"rendered":"Script to ping a list of computer names"},"content":{"rendered":"<p>A few weeks ago, I co-worker asked for a script to ping a list of computer names.  I thought I had one on my blog, but couldn&#8217;t find it.  I decided to post a copy here to make it easier to find in the future.  This is very simple, and doesn&#8217;t do any sort of multithreading, but for a short list it will get the job done pretty quick:<\/p>\n<pre><code class=\"language-powershell\">\r\n$ping = New-Object system.net.networkinformation.ping\r\nGet-Content someComputerList.txt | %{\r\n     try {$results = $ping.Send($_).Status } catch { $results = $false }\r\n     New-Object psobject -Property @{ Name=$_ ; Results=$results }\r\n}\r\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>A few weeks ago, I co-worker asked for a script to ping a list of computer names. I thought I had one on my blog, but couldn&#8217;t find it. I decided to post a copy here to make it easier &hellip; <a href=\"https:\/\/enterpriseadmins.org\/blog\/scripting\/script-to-ping-a-list-of-computer-names\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":6,"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,"footnotes":""},"categories":[3],"tags":[],"class_list":["post-1301","post","type-post","status-publish","format-standard","hentry","category-scripting"],"_links":{"self":[{"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/posts\/1301","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/comments?post=1301"}],"version-history":[{"count":3,"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/posts\/1301\/revisions"}],"predecessor-version":[{"id":1304,"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/posts\/1301\/revisions\/1304"}],"wp:attachment":[{"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/media?parent=1301"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/categories?post=1301"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/enterpriseadmins.org\/blog\/wp-json\/wp\/v2\/tags?post=1301"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}