powershell 将SQLite与PowerShell一起使用

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了powershell 将SQLite与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"

以上是关于powershell 将SQLite与PowerShell一起使用的主要内容,如果未能解决你的问题,请参考以下文章