PowerShell Logo Small

Remove-OdbcDsn



This is the built-in help made by Microsoft for the command 'Remove-OdbcDsn', 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

Removes one or more existing DSNs from the system.

SYNTAX


Remove-OdbcDsn [-InputObject] <CimInstance> [-AsJob [<SwitchParameter>]] [-CimSession <CimSession>] [-PassThru [<SwitchParameter>]]
[-ThrottleLimit <Int32>] [-Confirm [<SwitchParameter>]] [-WhatIf [<SwitchParameter>]] [<CommonParameters>]
Remove-OdbcDsn [-Name] <String> [-AsJob [<SwitchParameter>]] [-CimSession <CimSession>] [-DriverName <String>] [-PassThru [<SwitchParameter>]]
[-Platform <String>] [-ThrottleLimit <Int32>] -DsnType <String> [-Confirm [<SwitchParameter>]] [-WhatIf [<SwitchParameter>]]
[<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


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



<

RELATED LINKS

Add-OdbcDsn
Get-OdbcDsn
Set-OdbcDsn
N:Wdac



REMARKS

<

Examples




PS C:\> Remove-OdbcDsn -Name "*Payroll*" -DsnType User -Platform 32-bit



This command removes the 32-bit ODBC User DSN(s) with a name matches the wildcard "*Payroll*":






PS C:\> Remove-OdbcDsn "MyPayroll" -DsnType System



This command removes the ODBC System DSN with a name equal to "MyPayroll" from the native platform:






PS C:\> Remove-OdbcDsn -Name "*Payroll*" -DsnType System -Platform 32-bit -DriverName "SQL Server*"



This command removes all 32-bit ODBC System DSN(s) that match the wildcard pattern "*Payroll*" and are using the driver with a name started
with "SQL Server":






PS C:\> $sysDsn = Remove-OdbcDsn "MyPayroll" -DsnType User -Platform 32-bit -PassThru



This command removes the 32-bit ODBC User DSN(s) with a name that matches the wildcard "*Payroll*" and stores the deleted DSN object into a
PowerShell variable:






PS C:\> Get-OdbcDsn -Name "MyPayroll" -DsnType System | Remove-OdbcDsn



This command removes the ODBC System DSN on the native platform with name equal to "MyPayroll" and pipelines the object returned from the
command Get-OdbcDsn:






PS C:\> $dsnArray = Get-OdbcDsn -Name "MyPayroll" -DsnType System
Remove-OdbcDsn $dsnArray



This command removes the ODBC System DSN on the native platform with name equal to "MyPayroll" and uses the PowerShell variable $dsnArray: