title: writing encoded content to .ps1 file
body: <p>I am trying to create a file .ps1 and writing  the content using ruby.But i'm getting error.Below is the code </p>
  
  <pre><code>output = File.open( "test.ps1", "w" )
    output &lt;&lt; "$a = type c://edmundsapi-final ;(Get-Content C:\inetpub\sites\tsd_atlasapi\AppSettings.config) -replace '(?&lt;=&lt;add key="Edmunds" value=")[^"]*', $a | Set-Content C:\inetpub\sites\tsd_atlasapi\AppSettings.config "
   output.close
  </code></pre>