title: Running Query Against SQLite3 Database Thru Powershell
body: <p>currently i'm attempting to pull the users from a table in my SQLite3 database. Then i'd like to just have all the values (emails) stored in a variable. The issue i'm having is I just can't seem to get it to actually run the SQL statement and return the data. </p>
  
  <p>Currently I have the following below, but if you have any suggestions let me know.  I don't know if it's the path to my database or not. I'm able to access it using the Go.DB file in DB Browser.</p>
  
  <pre><code>Install-Module -Name PowerADO.NET
  Import-Module PowerADO.net
  
  $cn = new-object system.data.SQLite.SQLiteConnection("Data Source=C:\Go\go.db");
  $cn.Open()
  $q = @"
  SELECT [email],* FROM [main].[results] ORDER BY [email];
  "@
  $da = new-object System.Data.SQLite.SQLiteCommand ($q, $cn) # ($q, $cn)
  
  $da.Fill
  write-output $da
  
  
  
  </code></pre>