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