Skip to content

Instantly share code, notes, and snippets.

@jhorsman
Created May 14, 2018 10:20
Show Gist options
  • Select an option

  • Save jhorsman/8ebea7bc098d01591da597ed18e300d5 to your computer and use it in GitHub Desktop.

Select an option

Save jhorsman/8ebea7bc098d01591da597ed18e300d5 to your computer and use it in GitHub Desktop.
Use SQLite with PowerShell
if (-not (Get-Module PSSQLite -ListAvailable)) {
Install-Module PSSQLite
}
Import-Module PSSQLite
$Database = Join-Path $PSScriptRoot "example.sqlite"
#Invoke-SqliteQuery -DataSource $Database -Query "SELECT name FROM sqlite_master WHERE type='table';"
#Invoke-SqliteQuery -DataSource $Database -Query "PRAGMA table_info('MY_TABLE')"
Invoke-SqliteQuery -DataSource $Database -Query "SELECT * FROM MY_TABLE"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment