title: Using PowerShell to replace string that contains $ in the string
body: <p>I am trying to use PowerShell do a simple find and replace. I use template text files and use <code>$</code> in front of values that need to be changed.</p>
  
  <p>Example:</p>
  
  <pre><code>(Get-Content "D:\test") | Foreach-Object {$_ -replace "`$TBQUAL", "DBO"} | Set-Content "D:\test"
  </code></pre>
  
  <p>It should find the line <code>OWNER=$TBQUAL</code> and make it look like <code>OWNER=DBO</code>.</p>
  
  <p>I am using the escape in front of <code>$TBQUAL</code> with no luck. To test that it is working if I removed the <code>$</code> from the front, it would replace <code>TBQUAL</code> and made it look like <code>OWNER=$DBO</code>.</p>