Get-OdbcDriver
Get-OdbcDriver
Gets installed ODBC drivers.
Sintaxis
Parameter Set: Get0
Get-OdbcDriver [[-Name] <String> ] [-AsJob] [-CimSession <CimSession> ] [-Platform <String> ] [-ThrottleLimit <Int32> ] [ <CommonParameters>]
Descripción detallada
The Get-OdbcDriver cmdlet gets installed Open Database Connectivity (ODBC) drivers from the computer. Specify values for the Name and Platform parameters. If you do not specify a value for Name, the cmdlet gets drivers that have any driver name. If you do not specify any parameters, the cmdlet gets all ODBC drivers installed on the computer.
For more information about ODBC and drivers, see Microsoft Open Database Connectivity (ODBC) (https://msdn.microsoft.com/en-us/library/ms710252.aspx) and Drivers (https://msdn.microsoft.com/en-us/library/ms715383.aspx) on the Microsoft Developer Network.
Parámetros
-Name<String>
Specifies the name of a driver. You can use wildcard characters to specify more than one driver. This cmdlet gets one or more ODBC drivers that this parameter specifies. If you do not specify this parameter, this cmdlet gets all ODBC drivers.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
1 |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
true (ByPropertyName) |
¿Aceptar caracteres comodín? |
true |
-Platform<String>
Specifies the platform architecture. This cmdlet gets ODBC drivers that belong to the architecture that this parameter specifies. Los valores aceptables para este parámetro son los siguientes:
-- 32-bit
-- 64-bit
-- All
The default value is All. If you run this cmdlet in a remote CIM session, this parameter refers to the platform architecture on the remote computer.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
true (ByPropertyName) |
¿Aceptar caracteres comodín? |
false |
-AsJob
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
-CimSession<CimSession>
Ejecuta el cmdlet en una sesión remota o en un equipo remoto. Escriba un nombre de equipo o un objeto de sesión, como la salida de un cmdlet New-CimSession o Get-CimSession. El valor predeterminado es la sesión actual en el equipo local.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
-ThrottleLimit<Int32>
Especifica el número máximo de operaciones simultáneas que se pueden establecer para ejecutar el cmdlet. Si se omite este parámetro o es especifica un valor de 0
, Windows PowerShell ® calcula un límite óptimo para el cmdlet en función del número de cmdlets de CIM que se estén ejecutando en el equipo. El límite solo se aplica al cmdlet actual, no a la sesión ni al equipo.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
<CommonParameters>
Este cmdlet admite los siguientes parámetros comunes: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer y -OutVariable. Para obtener más información, consulte about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).
Entradas
El tipo de entrada es el tipo de los objetos que se pueden canalizar al cmdlet.
Salidas
El tipo de resultado es el tipo de objetos que emite el cmdlet.
- Microsoft.Management.Infrastructure.CimInstance#MSFT_OdbcDriver[]
Ejemplos
Example 1: Get all installed ODBC drivers
This command gets all installed ODBC drivers. The cmdlet gets both 32-bit and 64-bit drivers.
PS C:\> Get-OdbcDriver
Example 2: Get a driver on the 32-bit platform by using a name
This command gets the driver named SQL Server Native Client 10.0 on the 32-bit platform.
PS C:\> Get-OdbcDriver -Name "SQL Server Native Client 10.0" -Platform "32-bit"
Example 3: Get ODBC drivers that begin with a specified string on the 64-bit platform
This command gets installed ODBC drivers with a name that begins with SQL Server on the 64-bit platform.
PS C:\> Get-OdbcDriver -Name "SQL Server*" -Platform "64-bit"
Example 4: Get all ODBC drivers
This command gets all installed ODBC drivers, and then stores them in the $driverArray variable for future use.
PS C:\> $driverArray = Get-OdbcDriver
Temas relacionados
N:Wdac