Execution Flow
Detection is entirely read-only and safe to run repeatedly — it never touches the system. Its natural counterpart is Install-sqmOdbcDriver / Install-sqmJdbcDriver / Install-sqmDb2Driver for installing, and the matching
Uninstall-sqm*Driver commands for removal.Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| -DriverType | String | Required | Which driver family to check: JDBC, ODBC, or DB2. |
| -DriverName | String | Optional | Specific driver name to match, e.g. "ODBC Driver 18 for SQL Server". Without it, sensible defaults are used per type (highest version / mssql-jdbc*.jar / any IBM DB2 match). |
Return Value
Returns a single PSCustomObject with: DriverType, DriverName, Installed (bool), Version, Path, Status (Found, NotFound, or Error), Message.
Examples
Example 1 — Check for any Microsoft SQL Server ODBC driver
Test-sqmDriverInstalled -DriverType ODBCExample 2 — Check for a specific ODBC driver version
Test-sqmDriverInstalled -DriverType ODBC -DriverName 'ODBC Driver 18 for SQL Server'Example 3 — Check for the JDBC driver
Test-sqmDriverInstalled -DriverType JDBCExample 4 — Check for the DB2 client/driver
Test-sqmDriverInstalled -DriverType DB2