Utilisez ODBC de PowerShell
$conn = new-object System.Data.Odbc.OdbcConnection
$conn.connectionstring = "DSN=DSNNAME" # Find "DSNNAME" (i.e. connection name) in ODBC Data Source Admin > User DSN
$sqlCommand="SELECT VERSION();"
$conn.open()
$cmd = New-object System.Data.Odbc.OdbcCommand($sqlCommand,$conn)
$dataset = New-Object System.Data.DataSet
(New-Object System.Data.Odbc.OdbcDataAdapter($cmd)).Fill($dataSet)
$conn.Close()
$dataSet
$dataSet.Tables
Muddy Moose