title: How to run couchbase n1ql-command from powershell
body: <p>I'm trying to extract all the documents from a bucket and pipe them out to a file. I'm running this commmand:</p>
  
  <pre class="lang-bsh prettyprint-override"><code>PS C:\Program Files\Couchbase\Server\bin&gt; ./cbq --engine couchbase://localhost --user Administrator --password 'password' --script="SELECT * FROM `bucket.name`"
  </code></pre>
  
  <p>But Powershell expects something more and gives me newlines with <code>&gt;&gt;</code> at the start of each line after executing the command.</p>
  
  <p>If I drop the --script=... I log into the cqb-shell, and running the command/script works fine, but  piping to file becomes difficult.</p>
  
  <p>Do anyone have an idea of what's missing here? And how I can run the command from the terminal?</p>
  
  <p><code>PS C:\Program Files\Couchbase\Server\bin&gt; ./cbq -v
   SHELL VERSION  : 2.0</code> on  Couchbase Community Edition 6.0.0 build 1693</p>