<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.rabbibob.com/index.php?action=history&amp;feed=atom&amp;title=Powershell%3A_Ping_Stuff</id>
	<title>Powershell: Ping Stuff - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.rabbibob.com/index.php?action=history&amp;feed=atom&amp;title=Powershell%3A_Ping_Stuff"/>
	<link rel="alternate" type="text/html" href="https://www.rabbibob.com/index.php?title=Powershell:_Ping_Stuff&amp;action=history"/>
	<updated>2026-09-22T23:34:04Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.9</generator>
	<entry>
		<id>https://www.rabbibob.com/index.php?title=Powershell:_Ping_Stuff&amp;diff=2011&amp;oldid=prev</id>
		<title>Rabbi Bob at 19:04, 15 August 2026</title>
		<link rel="alternate" type="text/html" href="https://www.rabbibob.com/index.php?title=Powershell:_Ping_Stuff&amp;diff=2011&amp;oldid=prev"/>
		<updated>2026-08-15T19:04:45Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 19:04, 15 August 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l6&quot;&gt;Line 6:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 6:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=Code=&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=Code=&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;pre&lt;/del&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;SyntaxHighlight language=&quot;powershell&quot; line&lt;/ins&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;$deviceNames = Get-Content &amp;quot;devices.txt&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;$deviceNames = Get-Content &amp;quot;devices.txt&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l44&quot;&gt;Line 44:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 44:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Write-Host &amp;quot;Results exported to &amp;#039;results.csv&amp;#039;&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Write-Host &amp;quot;Results exported to &amp;#039;results.csv&amp;#039;&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;pre&lt;/del&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;SyntaxHighlight&lt;/ins&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Rabbi Bob</name></author>
	</entry>
	<entry>
		<id>https://www.rabbibob.com/index.php?title=Powershell:_Ping_Stuff&amp;diff=1982&amp;oldid=prev</id>
		<title>Rabbi Bob: Created page with &quot;Category:Powershell Category:Weblog-2026-08  Provide a list of IP addresses, run the script.  Checks DNS and outputs a results file.   =Code= &lt;pre&gt; $deviceNames = Get-Content &quot;devices.txt&quot;  $results = @()  foreach ($name in $deviceNames) {   $status = &quot;Unknown&quot;      try {     # Attempt to resolve DNS     [System.Net.Dns]::GetHostEntry($name)     $status = &quot;Resolving...&quot;          # Check if device pings (up to 4 attempts with 1 second timeout)     if (Test-Connect...&quot;</title>
		<link rel="alternate" type="text/html" href="https://www.rabbibob.com/index.php?title=Powershell:_Ping_Stuff&amp;diff=1982&amp;oldid=prev"/>
		<updated>2026-08-06T19:54:41Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;&lt;a href=&quot;/index.php/Category:Powershell&quot; title=&quot;Category:Powershell&quot;&gt;Category:Powershell&lt;/a&gt; &lt;a href=&quot;/index.php/Category:Weblog-2026-08&quot; title=&quot;Category:Weblog-2026-08&quot;&gt;Category:Weblog-2026-08&lt;/a&gt;  Provide a list of IP addresses, run the script.  Checks DNS and outputs a results file.   =Code= &amp;lt;pre&amp;gt; $deviceNames = Get-Content &amp;quot;devices.txt&amp;quot;  $results = @()  foreach ($name in $deviceNames) {   $status = &amp;quot;Unknown&amp;quot;      try {     # Attempt to resolve DNS     [System.Net.Dns]::GetHostEntry($name)     $status = &amp;quot;Resolving...&amp;quot;          # Check if device pings (up to 4 attempts with 1 second timeout)     if (Test-Connect...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[[Category:Powershell]]&lt;br /&gt;
[[Category:Weblog-2026-08]]&lt;br /&gt;
&lt;br /&gt;
Provide a list of IP addresses, run the script.  Checks DNS and outputs a results file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Code=&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$deviceNames = Get-Content &amp;quot;devices.txt&amp;quot;&lt;br /&gt;
&lt;br /&gt;
$results = @()&lt;br /&gt;
&lt;br /&gt;
foreach ($name in $deviceNames) {&lt;br /&gt;
  $status = &amp;quot;Unknown&amp;quot;&lt;br /&gt;
  &lt;br /&gt;
  try {&lt;br /&gt;
    # Attempt to resolve DNS&lt;br /&gt;
    [System.Net.Dns]::GetHostEntry($name)&lt;br /&gt;
    $status = &amp;quot;Resolving...&amp;quot;&lt;br /&gt;
    &lt;br /&gt;
    # Check if device pings (up to 4 attempts with 1 second timeout)&lt;br /&gt;
    if (Test-Connection -ComputerName $name -Count 1 -Quiet) {&lt;br /&gt;
      $status = &amp;quot;Up&amp;quot;&lt;br /&gt;
    } else {&lt;br /&gt;
      $status = &amp;quot;Down&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
  } catch {&lt;br /&gt;
    # Handle DNS resolution failure&lt;br /&gt;
    $status = &amp;quot;NO DNS&amp;quot;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  # Create a custom object for each device&lt;br /&gt;
  $result = New-Object PSObject -Property @{&lt;br /&gt;
    Name = $name&lt;br /&gt;
    Status = $status&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  # Add object to results array&lt;br /&gt;
  $results += $result&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
# Export results to CSV&lt;br /&gt;
$results | Export-Csv -Path &amp;quot;results.csv&amp;quot; -NoTypeInformation -Force&lt;br /&gt;
&lt;br /&gt;
Write-Host &amp;quot;Results exported to &amp;#039;results.csv&amp;#039;&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rabbi Bob</name></author>
	</entry>
</feed>