title: Add some data at the end of a specific line of a file in powershell
body: <p>I need to find in a file specific line and add some data at the end of the line, something like this:</p>
  
  <pre><code>function AddSomeData($file, $key, $value) 
  {
      $content = Get-Content $file
      if ($content -match "I work very") 
      {
          $content- add at the end $value
          Set-Content $file     
      }
  }
  
  AddSomeData "settings.conf" "I work very" " hard"
  </code></pre>
  
  <p>As a result - file with changed line: <em>I work very hard</em>. How to do that ?</p>