Partager via


SetByName method of the MSFT_OdbcDsnTask class

Modifies one or more ODBC DSNs.

Syntax

uint32 SetByName(
  [in]  boolean      PassThru,
  [in]  string       SetPropertyValue[],
  [in]  string       RemovePropertyValue[],
  [in]  string       Name,
  [in]  string       DriverName,
  [in]  string       Platform,
  [in]  string       DsnType,
  [out] MSFT_OdbcDsn cmdletOutput[]
);

Parameters

PassThru [in]

Passes the object created by this cmdlet through the pipeline. By default, this cmdlet does not pass any objects through the pipeline.

SetPropertyValue [in]

Specifies the property values of the ODBC DSN that you are modifying or adding. Format as an array of strings where each string is: <key>=<value>.

RemovePropertyValue [in]

Specifies the property values of the ODBC DSN to be deleted. This is an array of keys to be removed.

Name [in]

The name of the ODBC DSN to set. You can use wildcard characters.

DriverName [in]

This cmdlet will set the ODBC DSN using this driver only. You can use wildcard characters. The default is to set all ODBC DSNs.

Platform [in]

The platform architecture of the ODBC DSN to set. Possible values are '32-bit', '64-bit' or 'All'. The default is '32-bit' on a 32-bit process and '64-bit' on a 64-bit process. This is the platform architecture on the remote machine if this command is executed in a remote CIM session.

DsnType [in]

The type of the ODBC DSN to set. Possible values are 'User', 'System' or 'All'.

cmdletOutput [out]

The output is an array of CIM objects of type MSFT_OdbcDsn, each of which represents an ODBC DSN.

Requirements

Minimum supported client
Windows 8
Minimum supported server
Windows Server 2012
Namespace
Root\Microsoft\Windows\WDAC
MOF
WdacWmiProv.mof
DLL
WdacWmiProv.dll

See also

MSFT_OdbcDsnTask

MSFT_OdbcDsn