title: Add registry key to multiple remote computers
body: <p>I want to create a new registry key on multiple machines, but my script is not working. Can you give me some hints?</p>
  
  <pre><code>Import-Module ActiveDirectory
  Add-Type -AssemblyName System.Web 
  
  $Computers = Get-Content -Path 'G:\Shares\xxx\SebaTesty\computerlist.txt'
  
  $results = foreach ($computer in $Computers)
  {
      If (test-connection -ComputerName $computer -Count 1 -Quiet)
      {
          Try
          {
              New-ItemProperty -Path "hklm:\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" -Name "ArpRetryCount" -Value 0 -PropertyType "DWord"
              $status = "Success"
          }
          Catch
          {
              $status = "Failed"
          }
      }
  }
  
  Read-Host -Prompt "wait for enter"
  </code></pre>