title: Keep commented text in SQL query when using Invoke-Sqlcmd in PowerShell?
body: <p>For example, I have the following SQL query that I want to run in PowerShell:</p>
  
  <pre><code>select 
  item1, --this is a comment
  item2
  from myTable
  </code></pre>
  
  <p>If I tried to run this query in PowerShell using Invoke-Sqlcmd, I get a syntax error because it some how can't parse the comment as a comment:</p>
  
  <pre><code>Invoke-Sqlcmd -Query 'select item1, --this is a comment item2 from myTable'
  </code></pre>
  
  <p>Is there a way to keep my query comments?</p>