SetDNSDomain method of the Win32_NetworkAdapterConfiguration class
The SetDNSDomain WMI class method allows for the setting of the DNS domain. This is an instance-dependent method call that applies on a per-adapter basis. The setting applies to the targeted adapter.
Windows NT 4.0: The setting is global.
This topic uses Managed Object Format (MOF) syntax. For more information about using this method, see Calling a Method.
Syntax
uint32 SetDNSDomain( [in] string DNSDomain );
Parameters
- DNSDomain [in]
-
Domain with which the DNS is associated, represented by an organization name followed by a period and an extension that indicates the type of organization.
Example: "microsoft.com"
Return value
| Return code | Description |
|---|---|
|
Successful completion, no reboot required. |
|
Successful completion, reboot required. |
|
Method not supported on this platform. |
|
Unknown failure. |
|
Invalid subnet mask. |
|
An error occurred while processing an instance that was returned. |
|
Invalid input parameter. |
|
More than five gateways specified. |
|
Invalid IP address. |
|
Invalid gateway IP address. |
|
An error occurred while accessing the registry for the requested information. |
|
Invalid domain name. |
|
Invalid host name. |
|
No primary or secondary WINS server defined. |
|
Invalid file. |
|
Invalid system path. |
|
File copy failed. |
|
Invalid security parameter. |
|
Unable to configure TCP/IP service. |
|
Unable to configure DHCP service. |
|
Unable to renew DHCP lease. |
|
Unable to release DHCP lease. |
|
IP not enabled on adapter. |
|
IPX not enabled on adapter. |
|
Frame or network number bounds error. |
|
Invalid frame type. |
|
Invalid network number. |
|
Duplicate network number. |
|
Parameter out of bounds. |
|
Access denied. |
|
Out of memory. |
|
Already exists. |
|
Path, file, or object not found. |
|
Unable to notify service. |
|
Unable to notify DNS service. |
|
Interface not configurable. |
|
Not all DHCP leases can be released or renewed. |
|
DHCP not enabled on adapter. |
Examples
For script code examples, see WMI Tasks for Scripts and Applications and the TechNet ScriptCenter Script Repository.
For C++ code examples, see WMI C++ Application Examples.
Requirements
|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
|---|---|
|
Minimum supported server | Windows 2000 Server [desktop apps only] |
|
Namespace |
\root\CIMV2 |
|
MOF |
|
|
DLL |
|
See also
Send comments about this topic to Microsoft
Build date: 11/19/2012