Created
May 14, 2018 10:20
-
-
Save jhorsman/8ebea7bc098d01591da597ed18e300d5 to your computer and use it in GitHub Desktop.
Use SQLite with PowerShell
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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