Partager via


Add method of the MSFT_OdbcDsnTask class

Adds an ODBC DSN.

Syntax

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

Parameters

Name [in]

The name of the ODBC DSN to create. You cannot use wildcard characters.

DriverName [in]

The name of the ODBC driver for the new ODBC DSN. You cannot use wildcard characters.

SetPropertyValue [in]

Specifies the property values of the new ODBC DSN. Format as an array of strings where each string is: <key>=<value>.

PassThru [in]

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

Platform [in]

The platform architecture of the ODBC DSN you are adding. Possible values are '32-bit' or '64-bit'. 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 add. Possible values are 'User' or 'System'.

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