title: How to output MySQL query results in csv format in Windows environment?
body: <p>Is there an easy way to run a MySQL query from the PowerShell command line and output the results into a csv formatted file?</p>
  
  <p>This question is the same as <a href="https://stackoverflow.com/questions/356578/how-to-output-mysql-query-results-in-csv-format/29503241#29503241">How to output MySQL query results in CSV format?</a> except in Windows. I had to figure it out in PowerShell but my answer didn't belong on the linux question. So here's the Windows+PowerShell sibling. </p>