PowerShell Logo Small

Set-OdbcDriver



This is the built-in help made by Microsoft for the command 'Set-OdbcDriver', in PowerShell version 3 - as retrieved from Windows version 'Microsoft Windows Server 2012 Standard' PowerShell help files on 2016-06-23.

For PowerShell version 3 and up, where you have Update-Help, this command was run just before creating the web pages from the help files.

SYNOPSIS

Configure driver's properties for one or more installed ODBC drivers. This configures driver's properties for one or more installed ODBC drivers.

SYNTAX


Set-OdbcDriver [-InputObject] <CimInstance> [-AsJob [<SwitchParameter>]] [-CimSession <CimSession>] [-PassThru [<SwitchParameter>]]
[-RemovePropertyValue <String>] [-SetPropertyValue <String>] [-ThrottleLimit <Int32>] [-Confirm [<SwitchParameter>]] [-WhatIf
[<SwitchParameter>]] [<CommonParameters>]
Set-OdbcDriver [-Name] <String> [-AsJob [<SwitchParameter>]] [-CimSession <CimSession>] [-PassThru [<SwitchParameter>]] [-Platform <String>]
[-RemovePropertyValue <String>] [-SetPropertyValue <String>] [-ThrottleLimit <Int32>] [-Confirm [<SwitchParameter>]] [-WhatIf
[<SwitchParameter>]] [<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


Set-OdbcDriver configures an ODBC driver's properties for one or more installed ODBC drivers. Users can specify the properties to add or
modify with the parameter SetPropertyValue, and specify the properties to remove with the parameter RemovePropertyValue.


You should use the driver installation program to install and uninstall a driver. You cannot install or uninstall a driver using PowerShell
Cmdlets.


For more information about ODBC and drivers, see Microsoft Open Database Connectivity
(ODBC)http://msdn.microsoft.com/en-us/library/ms710252.aspx and Drivershttp://msdn.microsoft.com/en-us/library/ms715383.aspx.



<

RELATED LINKS

Get-OdbcDriver
N:Wdac



REMARKS

<

Examples




PS C:\> Set-OdbcDriver "SQL Server Native Client 10.0" -Platform 32-bit -SetPropertyValue "CPTimeout=60"



This command sets the key "CPTimeout" to the value 60 for the 32-bit driver named "SQL Server Native Client 10.0":






PS C:\> Set-OdbcDriver "SQL Server*" -RemovePropertyValue "aaa"



This command removes the property named "aaa" for all drivers with name started with "SQL Server" under the native platform:






PS C:\> Set-OdbcDriver -Name "SQL Server Native Client 10.0" -Platform All -RemovePropertyValue @("aaa1", "aaa2") -SetPropertyValue
@("aaa3=bbb3", "aaa4=bbb4")



This command removes the properties aaa1 and aaa2 and set the property aaa3 to bbb3 and aaa4 to bbb4 for driver named "SQL Server Native
Client 10.0" under both 32-bit and 64-bit architectures:






PS C:\> $driver = Set-OdbcDriver -Name "SQL Server Native Client 10.0" -Platform 32-bit -SetPropertyValue "aaa=bbb" -PassThru



This command sets the key "aaa" to the value "bbb" for the 32-bit driver named "SQL Server Native Client 10.0" and stores the driver object
into a PowerShell variable:






PS C:\> Get-OdbcDriver "SQL Server Native Client 10.0" -Platform All
| Set-OdbcDriver -RemovePropertyValue @("aaa1", "aaa2") -SetPropertyValue @("aaa3=bbb3", "aaa4=bbb4")



This command removes the properties aaa1 and aaa2 and sets the property aaa3 to bbb3 and aaa4 to bbb4 for driver named "SQL Server Native
Client 10.0" under both 32-bit and 64-bit architectures and uses the pipeline objects returned from the command Get-OdbcDriver:






PS C:\> $driverArray = Get-OdbcDriver "SQL Server Native Client 10.0" -Platform All
Set-OdbcDriver -InputObject $driverArray -RemovePropertyValue @("aaa1", "aaa2") -SetPropertyValue @("aaa3=bbb3", "aaa4=bbb4")



This command removes the properties aaa1 and aaa2 and sets the property aaa3 to bbb3 and aaa4 to bbb4 for driver named "SQL Server Native
Client 10.0" under both 32-bit and 64-bit architectures and uses the PowerShell variable $driverArray: