Main example
List instances
# All instances of Win32_NetworkAdapterConfiguration, with the main properties
Get-CimInstance -ClassName Win32_NetworkAdapterConfiguration |
Select-Object -Property @(
'Description'
'IPEnabled'
'DHCPEnabled'
'IPAddress'
'DefaultIPGateway'
'DNSServerSearchOrder'
'MACAddress'
)Examples
Filter with WQL
# WQL filter evaluated by the provider: adapters with IP enabled
Get-CimInstance -ClassName Win32_NetworkAdapterConfiguration -Filter 'IPEnabled = TRUE' |
Select-Object -Property @(
'Description'
'IPEnabled'
'DHCPEnabled'
'IPAddress'
'DefaultIPGateway'
'DNSServerSearchOrder'
'MACAddress'
)The filter is evaluated by the WMI provider: less data is transferred than with Where-Object.
Decode numeric values
# Lookup table for IGMPLevel (values documented by Microsoft)
$iGMPLevelName = @{
0 = 'No Multicast'
1 = 'IP Multicast'
2 = 'IP & IGMP multicast'
}
# Lookup table for IPXMediaType (values documented by Microsoft)
$iPXMediaTypeName = @{
1 = 'Ethernet'
2 = 'Token ring'
3 = 'FDDI'
8 = 'ARCNET'
}
Get-CimInstance -ClassName Win32_NetworkAdapterConfiguration |
Select-Object -Property @(
'Description'
'IPEnabled'
'DHCPEnabled'
'IPAddress'
'DefaultIPGateway'
'DNSServerSearchOrder'
'MACAddress'
)Query a remote computer (CIM session)
review before running# Name of the remote computer
$computerName = 'SERVER01'
# The CIM session (WSMan by default) can be reused for several queries
$cimSession = New-CimSession -ComputerName $computerName
try {
Get-CimInstance -CimSession $cimSession -ClassName Win32_NetworkAdapterConfiguration |
Select-Object -Property @(
'Description'
'IPEnabled'
'DHCPEnabled'
'IPAddress'
'DefaultIPGateway'
'DNSServerSearchOrder'
'MACAddress'
)
} finally {
Remove-CimSession -CimSession $cimSession
}WSMan (WinRM) is used by default. For a host without WinRM, create the session with -SessionOption (New-CimSessionOption -Protocol Dcom). Add -Credential to use another account.
Show the class structure
# Class structure: properties, types and flags (Key, ReadOnly…)
$cimClass = Get-CimClass -ClassName Win32_NetworkAdapterConfiguration
$cimClass.CimClassProperties |
Select-Object -Property Name, CimType, Flags
# Methods of the class
$cimClass.CimClassMethods |
Select-Object -Property Name, ReturnTypeProperties
| Name | Type | Access | Description | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ArpAlwaysSourceRoute# | boolean | read | If TRUE, TCP/IP transmits Address Resolution Protocol (ARP) queries with source routing enabled on Token Ring networks. By default (FALSE), ARP first queries without source routing, and then retries with source routing enabled if no reply is received. Source routing allows the routing of network packets across different types of networks. Code | ||||||||||||||||||
| ArpUseEtherSNAP# | boolean | read | If TRUE, Ethernet packets follow the IEEE 802.3 Sub-Network Access Protocol (SNAP) encoding. Setting this parameter to 1 forces TCP/IP to transmit Ethernet packets by using 802.3 SNAP encoding. By default (FALSE), the stack transmits packets in DIX Ethernet format. Code | ||||||||||||||||||
| Caption# | string | read | Short textual description of the current object. Code | ||||||||||||||||||
| DatabasePath# | string | read | Valid Windows file path to standard Internet database files (HOSTS, LMHOSTS, NETWORKS, and PROTOCOLS). The file path is used by the Windows Sockets interface. Code | ||||||||||||||||||
| DeadGWDetectEnabled# | boolean | read | If TRUE, dead gateway detection occurs. With this feature enabled, Transmission Control Protocol (TCP) asks Internet Protocol (IP) to change to a backup gateway if it retransmits a segment several times without receiving a response. Code | ||||||||||||||||||
| DefaultIPGateway# | string[] | read | Array of IP addresses of default gateways that the computer system uses. Example: "192.168.12.1 192.168.46.1" Code | ||||||||||||||||||
| DefaultTOS# | uint8 | read | Default Type Of Service (TOS) value set in the header of outgoing IP packets. Request for Comments (RFC) 791 defines the values. Default: 0 (zero), Valid Range: 0 - 255. Code | ||||||||||||||||||
| DefaultTTL# | uint8 | read | Default Time To Live (TTL) value set in the header of outgoing IP packets. The TTL specifies the number of routers an IP packet can pass through to reach its destination before being discarded. Each router decrements by one the TTL count of a packet as it passes through and discards the packets—if the TTL is 0 (zero). Default: 32, Valid Range: 1 - 255. Code | ||||||||||||||||||
| Description# | string | read | Textual description of the current object. Code | ||||||||||||||||||
| DHCPEnabled# | boolean | read | If TRUE, the dynamic host configuration protocol (DHCP) server automatically assigns an IP address to the computer system when establishing a network connection. Code | ||||||||||||||||||
| DHCPLeaseExpires# | datetime | read | Expiration date and time for a leased IP address that was assigned to the computer by the dynamic host configuration protocol (DHCP) server. Example: 20521201000230.000000000 Code | ||||||||||||||||||
| DHCPLeaseObtained# | datetime | read | Date and time the lease was obtained for the IP address assigned to the computer by the dynamic host configuration protocol (DHCP) server. Example: 19521201000230.000000000 Code | ||||||||||||||||||
| DHCPServer# | string | read | IP address of the dynamic host configuration protocol (DHCP) server. Example: "10.55.34.2" Code | ||||||||||||||||||
| DNSDomain# | string | read | Organization name followed by a period and an extension that indicates the type of organization, such as "microsoft.com". The name can be any combination of the letters A through Z, the numerals 0 through 9, and the hyphen (-), plus the period (.) character used as a separator. Example: "microsoft.com" Code | ||||||||||||||||||
| DNSDomainSuffixSearchOrder# | string[] | read | Array of DNS domain suffixes to be appended to the end of host names during name resolution. When attempting to resolve a fully qualified domain name (FQDN) from a host-only name, the system will first append the local domain name. If this is not successful, the system will use the domain suffix list to create additional FQDNs in the order listed and query DNS servers for each. Example: "samples.microsoft.com example.microsoft.com" Code | ||||||||||||||||||
| DNSEnabledForWINSResolution# | boolean | read | If TRUE, the Domain Name System (DNS) is enabled for name resolution over Windows Internet Naming Service (WINS) resolution. If the name cannot be resolved using DNS, the name request is forwarded to WINS for resolution. Code | ||||||||||||||||||
| DNSHostName# | string | read | Host name used to identify the local computer for authentication by some utilities. Other TCP/IP-based utilities can use this value to acquire the name of the local computer. Host names are stored on DNS servers in a table that maps names to IP addresses for use by DNS. The name can be any combination of the letters A through Z, the numerals 0 through 9, and the hyphen (-), plus the period (.) character used as a separator. By default, this value is the Microsoft networking computer name, but the network administrator can assign another host name without affecting the computer name. Example: "corpdns" Code | ||||||||||||||||||
| DNSServerSearchOrder# | string[] | read | Array of server IP addresses to be used in querying for DNS servers. Code | ||||||||||||||||||
| DomainDNSRegistrationEnabled# | boolean | read | If TRUE, the IP addresses for this connection are registered in DNS under the domain name of this connection in addition to being registered under the computer's full DNS name. The domain name of this connection is either set using the SetDNSDomain() method or assigned by DSCP. The registered name is the host name of the computer with the domain name appended. Code | ||||||||||||||||||
| ForwardBufferMemory# | uint32 | read | Memory allocated by IP to store packet data in the router packet queue. When this buffer space is filled, the router begins discarding packets at random from its queue. Packet queue data buffers are 256 bytes in length, so the value of this parameter should be a multiple of 256. Multiple buffers are chained together for larger packets. The IP header for a packet is stored separately. This parameter is ignored and no buffers are allocated if the IP router is not enabled. The buffer size can range from the network MTU to a value smaller than 0xFFFFFFFF. Default: 74240 (fifty 1480-byte packets, rounded to a multiple of 256). Unit: bytes Code | ||||||||||||||||||
| FullDNSRegistrationEnabled# | boolean | read | If TRUE, the IP addresses for this connection are registered in DNS under the computer's full DNS name. The full DNS name of the computer is displayed on the Network Identification tab in the System application in Control Panel. Code | ||||||||||||||||||
| GatewayCostMetric# | uint16[] | read | Array of integer cost metric values (ranging from 1 to 9999) to be used in calculating the fastest, most reliable, or least resource-intensive routes. This argument has a one-to-one correspondence with the DefaultIPGateway property. Code | ||||||||||||||||||
| IGMPLevel# | uint8 | read | Extent to which the system supports IP multicast and participates in the Internet Group Management Protocol (IGMP). At level 0 (zero), the system provides no multicast support. At level 1, the system may only send IP multicast packets. At level 2, the system may send IP multicast packets and fully participate in IGMP to receive multicast packets. Values (3)
Code | ||||||||||||||||||
| Index# key | uint32 | read | Index number of the Windows network adapter configuration. The index number is used when there is more than one configuration available. Code | ||||||||||||||||||
| InterfaceIndex# | uint32 | read | Index value that uniquely identifies a local network interface. The value in this property is the same as the value in the InterfaceIndex property in the instance of Win32_IP4RouteTable that represents the network interface in the route table. Code | ||||||||||||||||||
| IPAddress# | string[] | read | Array of all of the IP addresses associated with the current network adapter. This property can contain either IPv6 addresses or IPv4 addresses. For more information, see IPv6 and IPv4 Support in WMI. Example IPv6 address: "2010:836B:4179::836B:4179" Code | ||||||||||||||||||
| IPConnectionMetric# | uint32 | read | Cost of using the configured routes for the IP bound adapter and is the weighted value for those routes in the IP routing table. If there are multiple routes to a destination in the IP routing table, the route with the lowest metric is used. The default value is 1. Code | ||||||||||||||||||
| IPEnabled# | boolean | read | If TRUE, TCP/IP is bound and enabled on this network adapter. Code | ||||||||||||||||||
| IPFilterSecurityEnabled# | boolean | read | If TRUE, IP port security is enabled globally across all IP-bound network adapters and the security values associated with individual network adapters are in effect. This property is used in conjunction with IPSecPermitTCPPorts, IPSecPermitUDPPorts, and IPSecPermitIPProtocols. If FALSE, IP filter security is disabled across all network adapters and allows all port and protocol traffic to flow unfiltered. Code | ||||||||||||||||||
| IPPortSecurityEnabled# | boolean | read | If TRUE, IP port security is enabled globally across all IP-bound network adapters. This property is obsolete. In place of this property, you should use IPFilterSecurityEnabled. Code | ||||||||||||||||||
| IPSecPermitIPProtocols# | string[] | read | Array of the protocols permitted to run over the IP. The list of protocols is defined using the EnableIPSec method. The list will either be empty or contain numeric values. A numeric value of 0 (zero) indicates access permission is granted for all protocols. An empty string indicates that no protocols are permitted to run when IPFilterSecurityEnabled is TRUE. Code | ||||||||||||||||||
| IPSecPermitTCPPorts# | string[] | read | Array of the ports that will be granted access permission for TCP. The list of protocols is defined using the EnableIPSec method. The list will either be empty or contain numeric values. A numeric value of 0 (zero)indicates access permission is granted for all ports. An empty string indicates that no ports are granted access permission when IPFilterSecurityEnabled is TRUE. Code | ||||||||||||||||||
| IPSecPermitUDPPorts# | string[] | read | Array of the ports that will be granted User Datagram Protocol (UDP) access permission. The list of protocols is defined using the EnableIPSec method. The list will either be empty or contain numeric values. A numeric value of 0 (zero) indicates access permission is granted for all ports. An empty string indicates that no ports are granted access permission when IPFilterSecurityEnabled is TRUE. Code | ||||||||||||||||||
| IPSubnet# | string[] | read | Array of all of the subnet masks associated with the current network adapter. Example: "255.255.0.0" Code | ||||||||||||||||||
| IPUseZeroBroadcast# | boolean | read | If TRUE, IP zeros-broadcasts are used (0.0.0.0), and the system uses ones-broadcasts (255.255.255.255). Computer systems generally use ones-broadcasts, but those derived from BSD implementations use zeros-broadcasts. Systems that do not use that same broadcasts will not interoperate on the same network. The default is FALSE. Code | ||||||||||||||||||
| IPXAddress# | string | read | The Internetwork Packet Exchange (IPX) technology is no longer supported and this property does not contain useful data. Code | ||||||||||||||||||
| IPXEnabled# | boolean | read | The Internetwork Packet Exchange (IPX) technology is no longer supported and this property does not contain useful data. Code | ||||||||||||||||||
| IPXFrameType# | uint32[] | read | The Internetwork Packet Exchange (IPX) technology is no longer supported and this property does not contain useful data. Values (5)
Code | ||||||||||||||||||
| IPXMediaType# | uint32 | read | The Internetwork Packet Exchange (IPX) technology is no longer supported and this property does not contain useful data. Values (4)
Code | ||||||||||||||||||
| IPXNetworkNumber# | string[] | read | The Internetwork Packet Exchange (IPX) technology is no longer supported and this property does not contain useful data. Code | ||||||||||||||||||
| IPXVirtualNetNumber# | string | read | The Internetwork Packet Exchange (IPX) technology is no longer supported and this property does not contain useful data. Code | ||||||||||||||||||
| KeepAliveInterval# | uint32 | read | Interval separating Keep Alive Retransmissions until a response is received. After a response is received, the delay until the next Keep Alive Transmission is again controlled by the value of KeepAliveTime. The connection will be aborted after the number of retransmissions specified by TcpMaxDataRetransmissions have gone unanswered. Default: 1000, Valid Range: 1 - 0xFFFFFFFF. Unit: milliseconds Code | ||||||||||||||||||
| KeepAliveTime# | uint32 | read | The KeepAliveTime property indicates how often the TCP attempts to verify that an idle connection is still intact by sending a Keep Alive Packet. A remote system that is reachable will acknowledge the keep alive transmission. Keep Alive packets are not sent by default. This feature may be enabled in a connection by an application. Default: 7,200,000 (two hours). Unit: milliseconds Code | ||||||||||||||||||
| MACAddress# | string | read | Media Access Control (MAC) address of the network adapter. A MAC address is assigned by the manufacturer to uniquely identify the network adapter. Example: "00:80:C7:8F:6C:96" Code | ||||||||||||||||||
| MTU# | uint32 | read | Overrides the default Maximum Transmission Unit (MTU) for a network interface. The MTU is the maximum packet size (including the transport header) that the transport will transmit over the underlying network. The IP datagram can span multiple packets. The range of this value spans the minimum packet size (68) to the MTU supported by the underlying network. Unit: bytes Code | ||||||||||||||||||
| NumForwardPackets# | uint32 | read | Number of IP packet headers allocated for the router packet queue. When all headers are in use, the router will begin to discard packets from the queue at random. This value should be at least as large as the ForwardBufferMemory value divided by the maximum IP data size of the networks connected to the router. It should be no larger than the ForwardBufferMemory value divided by 256, since at least 256 bytes of forward buffer memory are used for each packet. The optimal number of forward packets for a given ForwardBufferMemory size depends on the type of traffic on the network. It will be somewhere between these two values. If the router is not enabled, this parameter is ignored and no headers are allocated. Default: 50, Valid Range: 1 - 0xFFFFFFFE. Code | ||||||||||||||||||
| PMTUBHDetectEnabled# | boolean | read | If TRUE, detection of black hole routers occurs while TCP discovers the path of the Maximum Transmission Unit. A black hole router does not return ICMP Destination Unreachable messages when it needs to fragment an IP datagram with the Don't Fragment bit set. TCP depends on receiving these messages to perform Path MTU Discovery. With this feature enabled, TCP will try to send segments without the Don't Fragment bit set if several retransmissions of a segment go unacknowledged. If the segment is acknowledged as a result, the MSS will be decreased and the Don't Fragment bit will be set in future packets on the connection. Enabling black hole detection increases the maximum number of retransmissions performed for a given segment. The default value of this property is FALSE. Code | ||||||||||||||||||
| PMTUDiscoveryEnabled# | boolean | read | If TRUE, the Maximum Transmission Unit (MTU) path is discovered over the path to a remote host. By discovering the MTU path and limiting TCP segments to this size, TCP can eliminate fragmentation at routers along the path that connect networks with different MTUs. Fragmentation adversely affects TCP throughput and network congestion. Setting this parameter to FALSE causes an MTU of 576 bytes to be used for all connections that are not to machines on the local subnet. The default is TRUE. Code | ||||||||||||||||||
| ServiceName# | string | read | Service name of the network adapter. This name is usually shorter than the full product name. Example: "Elnkii" Code | ||||||||||||||||||
| SettingID# | string | read | Identifier by which the current object is known. Code | ||||||||||||||||||
| TcpipNetbiosOptions# | uint32 | read | Bitmap of the possible settings related to NetBIOS over TCP/IP. Values are identified in the following list. Values (3)
Code | ||||||||||||||||||
| TcpMaxConnectRetransmissions# | uint32 | read | Number of times TCP attempts to retransmit a Connect Request before terminating the connection. The initial retransmission timeout is 3 seconds. The retransmission timeout doubles for each attempt. Default: 3, Valid Range: 0 - 0xFFFFFFFF. Code | ||||||||||||||||||
| TcpMaxDataRetransmissions# | uint32 | read | Number of times TCP retransmits an individual data segment (nonconnect segment) before terminating the connection. The retransmission timeout doubles with each successive retransmission on a connection. Default: 5, Valid Range: 0 - 0xFFFFFFFF. Code | ||||||||||||||||||
| TcpNumConnections# | uint32 | read | Maximum number of connections that TCP can have open simultaneously. Default: 0xFFFFFE, Valid Range: 0 - 0xFFFFFE. Code | ||||||||||||||||||
| TcpUseRFC1122UrgentPointer# | boolean | read | If TRUE, TCP uses the RFC 1122 specification for urgent data. If FALSE (default), TCP uses the mode used by Berkeley Software Design (BSD) derived systems. The two mechanisms interpret the urgent pointer differently and are not interoperable. The default value is FALSE. Code | ||||||||||||||||||
| TcpWindowSize# | uint16 | read | Maximum TCP Receive Window size offered by the system. The Receive Window specifies the number of bytes a sender may transmit without receiving an acknowledgment. In general, larger receiving windows will improve performance over high-delay and high-bandwidth networks. For efficiency, the receiving window should be an even multiple of the TCP Maximum Segment Size (MSS). Default: Four times the maximum TCP data size or an even multiple of TCP data size rounded up to the nearest multiple of 8192. Ethernet networks default to 8760. Valid range: 0 - 65535. Note: Windows Vista: This property accesses the Unit: bytes Code | ||||||||||||||||||
| WINSEnableLMHostsLookup# | boolean | read | If TRUE, local lookup files are used. Lookup files will contain a map of IP addresses to host names. If they exist on the local system, they will be found in %SystemRoot%\system32\drivers\etc. Code | ||||||||||||||||||
| WINSHostLookupFile# | string | read | Path to a WINS lookup file on the local system. This file will contain a map of IP addresses to host names. If the file specified in this property is found, it will be copied to the %SystemRoot%\system32\drivers\etc folder of the local system. Valid only if the WINSEnableLMHostsLookup property is TRUE. Code | ||||||||||||||||||
| WINSPrimaryServer# | string | read | IP address for the primary WINS server. Code | ||||||||||||||||||
| WINSScopeID# | string | read | Value appended to the end of the NetBIOS name that isolates a group of computer systems communicating with only each other. It is used for all NetBIOS transactions over TCP/IP communications from that computer system. Computers configured with identical scope identifiers are able to communicate with this computer. TCP/IP clients with different scope identifiers disregard packets from computers with this scope identifier. Valid only when the EnableWINS method executes successfully. Code | ||||||||||||||||||
| WINSSecondaryServer# | string | read | IP address for the secondary WINS server. Code |
Methods
DisableIPSec #
Disables IPsec on this TCP/IP-enabled network adapter.
uint32 DisableIPSec();Return values
| Value | Label | Description |
|---|---|---|
| 0 | Successful completion, no reboot required | |
| 1 | Successful completion, reboot required | |
| 64 | Method not supported on this platform | |
| 65 | Unknown failure | |
| 66 | Invalid subnet mask | |
| 67 | An error occurred while processing an Instance that was returned | |
| 68 | Invalid input parameter | |
| 69 | More than 5 gateways specified | More than five gateways specified. |
| 70 | Invalid IP address | |
| 71 | Invalid gateway IP address | |
| 72 | An error occurred while accessing the Registry for the requested information | |
| 73 | Invalid domain name | |
| 74 | Invalid host name | |
| 75 | No primary/secondary WINS server defined | No primary or secondary WINS server defined. |
| 76 | Invalid file | |
| 77 | Invalid system path | |
| 78 | File copy failed | |
| 79 | Invalid security parameter | |
| 80 | Unable to configure TCP/IP service | |
| 81 | Unable to configure DHCP service | |
| 82 | Unable to renew DHCP lease | |
| 83 | Unable to release DHCP lease | |
| 84 | IP not enabled on adapter | |
| 85 | IPX not enabled on adapter | |
| 86 | Frame/network number bounds error | Frame or network number bounds error. |
| 87 | Invalid frame type | |
| 88 | Invalid network number | |
| 89 | Duplicate network number | |
| 90 | Parameter out of bounds | |
| 91 | Access denied | |
| 92 | Out of memory | |
| 93 | Already exists | |
| 94 | Path, file or object not found | Path, file, or object not found. |
| 95 | Unable to notify service | |
| 96 | Unable to notify DNS service | |
| 97 | Interface not configurable | |
| 98 | Not all DHCP leases could be released/renewed | Not all DHCP leases could be released or renewed. |
| 100 | DHCP not enabled on adapter | DHCP not enabled on the adapter. |
| 101..4294967295 | Other |
Call the DisableIPSec method
review before running# Warning: this method can change the system. -WhatIf shows the operation without running it.
# Target instance
$instance = Get-CimInstance -ClassName Win32_NetworkAdapterConfiguration -Filter 'IPEnabled = TRUE'
$methodParameters = @{
InputObject = $instance
MethodName = 'DisableIPSec'
WhatIf = $true # Remove this line to actually run the method
}
$result = Invoke-CimMethod @methodParameters
# With -WhatIf nothing runs and no result is returned
if ($result) {
$returnValueName = @{
0 = 'Successful completion, no reboot required'
1 = 'Successful completion, reboot required'
64 = 'Method not supported on this platform'
65 = 'Unknown failure'
66 = 'Invalid subnet mask'
67 = 'An error occurred while processing an Instance that was returned'
68 = 'Invalid input parameter'
69 = 'More than 5 gateways specified'
70 = 'Invalid IP address'
71 = 'Invalid gateway IP address'
72 = 'An error occurred while accessing the Registry for the…'
73 = 'Invalid domain name'
74 = 'Invalid host name'
75 = 'No primary/secondary WINS server defined'
76 = 'Invalid file'
77 = 'Invalid system path'
78 = 'File copy failed'
79 = 'Invalid security parameter'
80 = 'Unable to configure TCP/IP service'
81 = 'Unable to configure DHCP service'
82 = 'Unable to renew DHCP lease'
83 = 'Unable to release DHCP lease'
84 = 'IP not enabled on adapter'
85 = 'IPX not enabled on adapter'
86 = 'Frame/network number bounds error'
87 = 'Invalid frame type'
88 = 'Invalid network number'
89 = 'Duplicate network number'
90 = 'Parameter out of bounds'
91 = 'Access denied'
92 = 'Out of memory'
93 = 'Already exists'
94 = 'Path, file or object not found'
95 = 'Unable to notify service'
96 = 'Unable to notify DNS service'
97 = 'Interface not configurable'
98 = 'Not all DHCP leases could be released/renewed'
100 = 'DHCP not enabled on adapter'
}
$returnValueName[[int]$result.ReturnValue]
}This method can change the system. The -WhatIf parameter shows the operation without running it: remove it only after checking.
EnableDHCP #
Enables the Dynamic Host Configuration Protocol (DHCP) for service with this network adapter.
uint32 EnableDHCP();Return values
| Value | Label | Description |
|---|---|---|
| 0 | Successful completion, no reboot required | |
| 1 | Successful completion, reboot required | |
| 64 | Method not supported on this platform | |
| 65 | Unknown failure | |
| 66 | Invalid subnet mask | |
| 67 | An error occurred while processing an Instance that was returned | |
| 68 | Invalid input parameter | |
| 69 | More than 5 gateways specified | More than five gateways specified. |
| 70 | Invalid IP address | |
| 71 | Invalid gateway IP address | |
| 72 | An error occurred while accessing the Registry for the requested information | |
| 73 | Invalid domain name | |
| 74 | Invalid host name | |
| 75 | No primary/secondary WINS server defined | No primary or secondary WINS server defined. |
| 76 | Invalid file | |
| 77 | Invalid system path | |
| 78 | File copy failed | |
| 79 | Invalid security parameter | |
| 80 | Unable to configure TCP/IP service | |
| 81 | Unable to configure DHCP service | |
| 82 | Unable to renew DHCP lease | |
| 83 | Unable to release DHCP lease | |
| 84 | IP not enabled on adapter | |
| 85 | IPX not enabled on adapter | |
| 86 | Frame/network number bounds error | Frame or network number bounds error. |
| 87 | Invalid frame type | |
| 88 | Invalid network number | |
| 89 | Duplicate network number | |
| 90 | Parameter out of bounds | |
| 91 | Access denied | |
| 92 | Out of memory | |
| 93 | Already exists | |
| 94 | Path, file or object not found | Path, file, or object not found. |
| 95 | Unable to notify service | |
| 96 | Unable to notify DNS service | |
| 97 | Interface not configurable | |
| 98 | Not all DHCP leases could be released/renewed | Not all DHCP leases could be released or renewed. |
| 100 | DHCP not enabled on adapter | DHCP not enabled on the adapter. |
| 101..4294967295 | Other |
Call the EnableDHCP method
review before running# Warning: this method can change the system. -WhatIf shows the operation without running it.
# Target instance
$instance = Get-CimInstance -ClassName Win32_NetworkAdapterConfiguration -Filter 'IPEnabled = TRUE'
$methodParameters = @{
InputObject = $instance
MethodName = 'EnableDHCP'
WhatIf = $true # Remove this line to actually run the method
}
$result = Invoke-CimMethod @methodParameters
# With -WhatIf nothing runs and no result is returned
if ($result) {
$returnValueName = @{
0 = 'Successful completion, no reboot required'
1 = 'Successful completion, reboot required'
64 = 'Method not supported on this platform'
65 = 'Unknown failure'
66 = 'Invalid subnet mask'
67 = 'An error occurred while processing an Instance that was returned'
68 = 'Invalid input parameter'
69 = 'More than 5 gateways specified'
70 = 'Invalid IP address'
71 = 'Invalid gateway IP address'
72 = 'An error occurred while accessing the Registry for the…'
73 = 'Invalid domain name'
74 = 'Invalid host name'
75 = 'No primary/secondary WINS server defined'
76 = 'Invalid file'
77 = 'Invalid system path'
78 = 'File copy failed'
79 = 'Invalid security parameter'
80 = 'Unable to configure TCP/IP service'
81 = 'Unable to configure DHCP service'
82 = 'Unable to renew DHCP lease'
83 = 'Unable to release DHCP lease'
84 = 'IP not enabled on adapter'
85 = 'IPX not enabled on adapter'
86 = 'Frame/network number bounds error'
87 = 'Invalid frame type'
88 = 'Invalid network number'
89 = 'Duplicate network number'
90 = 'Parameter out of bounds'
91 = 'Access denied'
92 = 'Out of memory'
93 = 'Already exists'
94 = 'Path, file or object not found'
95 = 'Unable to notify service'
96 = 'Unable to notify DNS service'
97 = 'Interface not configurable'
98 = 'Not all DHCP leases could be released/renewed'
100 = 'DHCP not enabled on adapter'
}
$returnValueName[[int]$result.ReturnValue]
}This method can change the system. The -WhatIf parameter shows the operation without running it: remove it only after checking.
EnableDNS static#
Enables the Domain Name System (DNS) for service on this TCP/IP-bound network adapter.
uint32 EnableDNS(
[in] string DNSHostName,
[in] string DNSDomain,
[in] string[] DNSServerSearchOrder,
[in] string[] DNSDomainSuffixSearchOrder
);Parameters
| Parameter | Type | Direction | Description |
|---|---|---|---|
| DNSHostName | string | in | Name of the DNS host that this method enables. Example: "corpdns" |
| DNSDomain | string | in | Represents an organization name followed by a period and an extension that indicates the type of organization. Example: "microsoft.com" |
| DNSServerSearchOrder | string[] | in | List of server IP addresses to query for DNS servers. |
| DNSDomainSuffixSearchOrder | string[] | in | DNS domain suffix that is appended to a host name during name resolution. When resolving a fully qualified domain name (FQDN) from a host-only name, the system appends the local domain name. If the name resolution is not successful, the system uses the domain suffix list to create additional FQDNs in the order listed, and then queries DNS servers for each one. |
Return values
| Value | Label | Description |
|---|---|---|
| 0 | Successful completion, no reboot required | |
| 1 | Successful completion, reboot required | |
| 64 | Method not supported on this platform | |
| 65 | Unknown failure | |
| 66 | Invalid subnet mask | |
| 67 | An error occurred while processing an Instance that was returned | |
| 68 | Invalid input parameter | |
| 69 | More than 5 gateways specified | More than five gateways specified. |
| 70 | Invalid IP address | |
| 71 | Invalid gateway IP address | |
| 72 | An error occurred while accessing the Registry for the requested information | |
| 73 | Invalid domain name | |
| 74 | Invalid host name | |
| 75 | No primary/secondary WINS server defined | No primary or secondary WINS server defined. |
| 76 | Invalid file | |
| 77 | Invalid system path | |
| 78 | File copy failed | |
| 79 | Invalid security parameter | |
| 80 | Unable to configure TCP/IP service | |
| 81 | Unable to configure DHCP service | |
| 82 | Unable to renew DHCP lease | |
| 83 | Unable to release DHCP lease | |
| 84 | IP not enabled on adapter | |
| 85 | IPX not enabled on adapter | |
| 86 | Frame/network number bounds error | Frame or network number bounds error. |
| 87 | Invalid frame type | |
| 88 | Invalid network number | |
| 89 | Duplicate network number | |
| 90 | Parameter out of bounds | |
| 91 | Access denied | |
| 92 | Out of memory | |
| 93 | Already exists | |
| 94 | Path, file or object not found | Path, file, or object not found. |
| 95 | Unable to notify service | |
| 96 | Unable to notify DNS service | |
| 97 | Interface not configurable | |
| 98 | Not all DHCP leases could be released/renewed | Not all DHCP leases can be released or renewed. |
| 100 | DHCP not enabled on adapter | |
| 101..4294967295 | Other |
Call the EnableDNS method
review before running# Warning: this method can change the system. -WhatIf shows the operation without running it.
$methodParameters = @{
ClassName = 'Win32_NetworkAdapterConfiguration'
MethodName = 'EnableDNS'
Arguments = @{
DNSHostName = 'Example'
DNSDomain = 'Example'
DNSServerSearchOrder = @('Example')
DNSDomainSuffixSearchOrder = @('Example')
}
WhatIf = $true # Remove this line to actually run the method
}
$result = Invoke-CimMethod @methodParameters
# With -WhatIf nothing runs and no result is returned
if ($result) {
$returnValueName = @{
0 = 'Successful completion, no reboot required'
1 = 'Successful completion, reboot required'
64 = 'Method not supported on this platform'
65 = 'Unknown failure'
66 = 'Invalid subnet mask'
67 = 'An error occurred while processing an Instance that was returned'
68 = 'Invalid input parameter'
69 = 'More than 5 gateways specified'
70 = 'Invalid IP address'
71 = 'Invalid gateway IP address'
72 = 'An error occurred while accessing the Registry for the…'
73 = 'Invalid domain name'
74 = 'Invalid host name'
75 = 'No primary/secondary WINS server defined'
76 = 'Invalid file'
77 = 'Invalid system path'
78 = 'File copy failed'
79 = 'Invalid security parameter'
80 = 'Unable to configure TCP/IP service'
81 = 'Unable to configure DHCP service'
82 = 'Unable to renew DHCP lease'
83 = 'Unable to release DHCP lease'
84 = 'IP not enabled on adapter'
85 = 'IPX not enabled on adapter'
86 = 'Frame/network number bounds error'
87 = 'Invalid frame type'
88 = 'Invalid network number'
89 = 'Duplicate network number'
90 = 'Parameter out of bounds'
91 = 'Access denied'
92 = 'Out of memory'
93 = 'Already exists'
94 = 'Path, file or object not found'
95 = 'Unable to notify service'
96 = 'Unable to notify DNS service'
97 = 'Interface not configurable'
98 = 'Not all DHCP leases could be released/renewed'
100 = 'DHCP not enabled on adapter'
}
$returnValueName[[int]$result.ReturnValue]
}This method can change the system. The -WhatIf parameter shows the operation without running it: remove it only after checking.
EnableIPFilterSec static#
Enables IPsec globally across all IP-bound network adapters.
uint32 EnableIPFilterSec([in] boolean IPFilterSecurityEnabled);Parameters
| Parameter | Type | Direction | Description |
|---|---|---|---|
| IPFilterSecurityEnabled | boolean | in | If true, IPsec is enabled globally across all IP-bound network adapters. If false, all port and protocol traffic is allowed to flow unfiltered. |
Return values
| Value | Label | Description |
|---|---|---|
| 0 | Successful completion, no reboot required | |
| 1 | Successful completion, reboot required | |
| 64 | Method not supported on this platform | |
| 65 | Unknown failure | |
| 66 | Invalid subnet mask | |
| 67 | An error occurred while processing an Instance that was returned | |
| 68 | Invalid input parameter | |
| 69 | More than 5 gateways specified | More than five gateways specified. |
| 70 | Invalid IP address | |
| 71 | Invalid gateway IP address | |
| 72 | An error occurred while accessing the Registry for the requested information | |
| 73 | Invalid domain name | |
| 74 | Invalid host name | |
| 75 | No primary/secondary WINS server defined | No primary or secondary WINS server defined. |
| 76 | Invalid file | |
| 77 | Invalid system path | |
| 78 | File copy failed | |
| 79 | Invalid security parameter | |
| 80 | Unable to configure TCP/IP service | |
| 81 | Unable to configure DHCP service | |
| 82 | Unable to renew DHCP lease | |
| 83 | Unable to release DHCP lease | |
| 84 | IP not enabled on adapter | |
| 85 | IPX not enabled on adapter | |
| 86 | Frame/network number bounds error | Frame or network number bounds error. |
| 87 | Invalid frame type | |
| 88 | Invalid network number | |
| 89 | Duplicate network number | |
| 90 | Parameter out of bounds | |
| 91 | Access denied | |
| 92 | Out of memory | |
| 93 | Already exists | |
| 94 | Path, file or object not found | Path, file, or object not found. |
| 95 | Unable to notify service | |
| 96 | Unable to notify DNS service | |
| 97 | Interface not configurable | |
| 98 | Not all DHCP leases could be released/renewed | Not all DHCP leases could be released or renewed. |
| 100 | DHCP not enabled on adapter | DHCP not enabled on the adapter. |
| 101..4294967295 | Other |
Call the EnableIPFilterSec method
review before running# Warning: this method can change the system. -WhatIf shows the operation without running it.
$methodParameters = @{
ClassName = 'Win32_NetworkAdapterConfiguration'
MethodName = 'EnableIPFilterSec'
Arguments = @{ IPFilterSecurityEnabled = $false }
WhatIf = $true # Remove this line to actually run the method
}
$result = Invoke-CimMethod @methodParameters
# With -WhatIf nothing runs and no result is returned
if ($result) {
$returnValueName = @{
0 = 'Successful completion, no reboot required'
1 = 'Successful completion, reboot required'
64 = 'Method not supported on this platform'
65 = 'Unknown failure'
66 = 'Invalid subnet mask'
67 = 'An error occurred while processing an Instance that was returned'
68 = 'Invalid input parameter'
69 = 'More than 5 gateways specified'
70 = 'Invalid IP address'
71 = 'Invalid gateway IP address'
72 = 'An error occurred while accessing the Registry for the…'
73 = 'Invalid domain name'
74 = 'Invalid host name'
75 = 'No primary/secondary WINS server defined'
76 = 'Invalid file'
77 = 'Invalid system path'
78 = 'File copy failed'
79 = 'Invalid security parameter'
80 = 'Unable to configure TCP/IP service'
81 = 'Unable to configure DHCP service'
82 = 'Unable to renew DHCP lease'
83 = 'Unable to release DHCP lease'
84 = 'IP not enabled on adapter'
85 = 'IPX not enabled on adapter'
86 = 'Frame/network number bounds error'
87 = 'Invalid frame type'
88 = 'Invalid network number'
89 = 'Duplicate network number'
90 = 'Parameter out of bounds'
91 = 'Access denied'
92 = 'Out of memory'
93 = 'Already exists'
94 = 'Path, file or object not found'
95 = 'Unable to notify service'
96 = 'Unable to notify DNS service'
97 = 'Interface not configurable'
98 = 'Not all DHCP leases could be released/renewed'
100 = 'DHCP not enabled on adapter'
}
$returnValueName[[int]$result.ReturnValue]
}This method can change the system. The -WhatIf parameter shows the operation without running it: remove it only after checking.
EnableIPSec #
Enables IPsec on this specific TCP/IP-enabled network adapter.
uint32 EnableIPSec(
[in] string[] IPSecPermitTCPPorts,
[in] string[] IPSecPermitUDPPorts,
[in] string[] IPSecPermitIPProtocols
);Parameters
| Parameter | Type | Direction | Description |
|---|---|---|---|
| IPSecPermitTCPPorts | string[] | in | List of ports to be granted access permission for TCP. A numeric value of 0 (zero) indicates access permission is granted for all ports. An empty array indicates that no ports are to be granted access permission. |
| IPSecPermitUDPPorts | string[] | in | List of ports to be granted access permission for UDP. A numeric value of 0 (zero) indicates access permission is granted for all ports. An empty array indicates that no ports are to be granted access permission. |
| IPSecPermitIPProtocols | string[] | in | List of protocols permitted to run over the IP. A numeric value of 0 (zero) indicates access permission is granted for all protocols. An empty array indicates that no protocols are granted access permission. |
Return values
| Value | Label | Description |
|---|---|---|
| 0 | Successful completion, no reboot required | |
| 1 | Successful completion, reboot required | |
| 64 | Method not supported on this platform | |
| 65 | Unknown failure | |
| 66 | Invalid subnet mask | |
| 67 | An error occurred while processing an Instance that was returned | |
| 68 | Invalid input parameter | |
| 69 | More than 5 gateways specified | More than five gateways specified. |
| 70 | Invalid IP address | |
| 71 | Invalid gateway IP address | |
| 72 | An error occurred while accessing the Registry for the requested information | |
| 73 | Invalid domain name | |
| 74 | Invalid host name | |
| 75 | No primary/secondary WINS server defined | No primary or secondary WINS server defined. |
| 76 | Invalid file | |
| 77 | Invalid system path | |
| 78 | File copy failed | |
| 79 | Invalid security parameter | |
| 80 | Unable to configure TCP/IP service | |
| 81 | Unable to configure DHCP service | |
| 82 | Unable to renew DHCP lease | |
| 83 | Unable to release DHCP lease | |
| 84 | IP not enabled on adapter | |
| 85 | IPX not enabled on adapter | |
| 86 | Frame/network number bounds error | Frame or network number bounds error. |
| 87 | Invalid frame type | |
| 88 | Invalid network number | |
| 89 | Duplicate network number | |
| 90 | Parameter out of bounds | |
| 91 | Access denied | |
| 92 | Out of memory | |
| 93 | Already exists | |
| 94 | Path, file or object not found | Path, file, or object not found. |
| 95 | Unable to notify service | |
| 96 | Unable to notify DNS service | |
| 97 | Interface not configurable | |
| 98 | Not all DHCP leases could be released/renewed | Not all DHCP leases could be released or renewed. |
| 100 | DHCP not enabled on adapter | DHCP not enabled on the adapter. |
| 101..4294967295 | Other |
Call the EnableIPSec method
review before running# Warning: this method can change the system. -WhatIf shows the operation without running it.
# Target instance
$instance = Get-CimInstance -ClassName Win32_NetworkAdapterConfiguration -Filter 'IPEnabled = TRUE'
$methodParameters = @{
InputObject = $instance
MethodName = 'EnableIPSec'
Arguments = @{
IPSecPermitTCPPorts = @('Example')
IPSecPermitUDPPorts = @('Example')
IPSecPermitIPProtocols = @('Example')
}
WhatIf = $true # Remove this line to actually run the method
}
$result = Invoke-CimMethod @methodParameters
# With -WhatIf nothing runs and no result is returned
if ($result) {
$returnValueName = @{
0 = 'Successful completion, no reboot required'
1 = 'Successful completion, reboot required'
64 = 'Method not supported on this platform'
65 = 'Unknown failure'
66 = 'Invalid subnet mask'
67 = 'An error occurred while processing an Instance that was returned'
68 = 'Invalid input parameter'
69 = 'More than 5 gateways specified'
70 = 'Invalid IP address'
71 = 'Invalid gateway IP address'
72 = 'An error occurred while accessing the Registry for the…'
73 = 'Invalid domain name'
74 = 'Invalid host name'
75 = 'No primary/secondary WINS server defined'
76 = 'Invalid file'
77 = 'Invalid system path'
78 = 'File copy failed'
79 = 'Invalid security parameter'
80 = 'Unable to configure TCP/IP service'
81 = 'Unable to configure DHCP service'
82 = 'Unable to renew DHCP lease'
83 = 'Unable to release DHCP lease'
84 = 'IP not enabled on adapter'
85 = 'IPX not enabled on adapter'
86 = 'Frame/network number bounds error'
87 = 'Invalid frame type'
88 = 'Invalid network number'
89 = 'Duplicate network number'
90 = 'Parameter out of bounds'
91 = 'Access denied'
92 = 'Out of memory'
93 = 'Already exists'
94 = 'Path, file or object not found'
95 = 'Unable to notify service'
96 = 'Unable to notify DNS service'
97 = 'Interface not configurable'
98 = 'Not all DHCP leases could be released/renewed'
100 = 'DHCP not enabled on adapter'
}
$returnValueName[[int]$result.ReturnValue]
}This method can change the system. The -WhatIf parameter shows the operation without running it: remove it only after checking.
EnableStatic #
Enables static TCP/IP addressing for the target network adapter.
uint32 EnableStatic([in] string[] IPAddress, [in] string[] SubnetMask);Parameters
| Parameter | Type | Direction | Description |
|---|---|---|---|
| IPAddress | string[] | in | Lists all of the static IP addresses for the current network adapter. Example: 155.34.22.0. |
| SubnetMask | string[] | in | Subnet masks that complement the values in the *IPAddress* parameter. Example: 255.255.0.0. |
Return values
| Value | Label | Description |
|---|---|---|
| 0 | Successful completion, no reboot required | |
| 1 | Successful completion, reboot required | |
| 64 | Method not supported on this platform | |
| 65 | Unknown failure | |
| 66 | Invalid subnet mask | |
| 67 | An error occurred while processing an Instance that was returned | |
| 68 | Invalid input parameter | |
| 69 | More than 5 gateways specified | More than five gateways specified. |
| 70 | Invalid IP address | |
| 71 | Invalid gateway IP address | |
| 72 | An error occurred while accessing the Registry for the requested information | |
| 73 | Invalid domain name | |
| 74 | Invalid host name | |
| 75 | No primary/secondary WINS server defined | No primary or secondary WINS server defined. |
| 76 | Invalid file | |
| 77 | Invalid system path | |
| 78 | File copy failed | |
| 79 | Invalid security parameter | |
| 80 | Unable to configure TCP/IP service | |
| 81 | Unable to configure DHCP service | Unable to configure DHCP service. For more information, see the Remarks section. |
| 82 | Unable to renew DHCP lease | |
| 83 | Unable to release DHCP lease | |
| 84 | IP not enabled on adapter | |
| 85 | IPX not enabled on adapter | |
| 86 | Frame/network number bounds error | Frame or network number bounds error. |
| 87 | Invalid frame type | |
| 88 | Invalid network number | |
| 89 | Duplicate network number | |
| 90 | Parameter out of bounds | |
| 91 | Access denied | |
| 92 | Out of memory | |
| 93 | Already exists | |
| 94 | Path, file or object not found | Path, file, or object not found. |
| 95 | Unable to notify service | |
| 96 | Unable to notify DNS service | |
| 97 | Interface not configurable | |
| 98 | Not all DHCP leases could be released/renewed | Not all DHCP leases could be released or renewed. |
| 100 | DHCP not enabled on adapter | |
| 2147786788 | Write lock not enabled. For more information, see INetCfgLock::AcquireWriteLock). | |
| 101..4294967295 | Other |
Call the EnableStatic method
review before running# Warning: this method can change the system. -WhatIf shows the operation without running it.
# Target instance
$instance = Get-CimInstance -ClassName Win32_NetworkAdapterConfiguration -Filter 'IPEnabled = TRUE'
$methodParameters = @{
InputObject = $instance
MethodName = 'EnableStatic'
Arguments = @{
IPAddress = @('Example')
SubnetMask = @('Example')
}
WhatIf = $true # Remove this line to actually run the method
}
$result = Invoke-CimMethod @methodParameters
# With -WhatIf nothing runs and no result is returned
if ($result) {
$returnValueName = @{
0 = 'Successful completion, no reboot required'
1 = 'Successful completion, reboot required'
64 = 'Method not supported on this platform'
65 = 'Unknown failure'
66 = 'Invalid subnet mask'
67 = 'An error occurred while processing an Instance that was returned'
68 = 'Invalid input parameter'
69 = 'More than 5 gateways specified'
70 = 'Invalid IP address'
71 = 'Invalid gateway IP address'
72 = 'An error occurred while accessing the Registry for the…'
73 = 'Invalid domain name'
74 = 'Invalid host name'
75 = 'No primary/secondary WINS server defined'
76 = 'Invalid file'
77 = 'Invalid system path'
78 = 'File copy failed'
79 = 'Invalid security parameter'
80 = 'Unable to configure TCP/IP service'
81 = 'Unable to configure DHCP service'
82 = 'Unable to renew DHCP lease'
83 = 'Unable to release DHCP lease'
84 = 'IP not enabled on adapter'
85 = 'IPX not enabled on adapter'
86 = 'Frame/network number bounds error'
87 = 'Invalid frame type'
88 = 'Invalid network number'
89 = 'Duplicate network number'
90 = 'Parameter out of bounds'
91 = 'Access denied'
92 = 'Out of memory'
93 = 'Already exists'
94 = 'Path, file or object not found'
95 = 'Unable to notify service'
96 = 'Unable to notify DNS service'
97 = 'Interface not configurable'
98 = 'Not all DHCP leases could be released/renewed'
100 = 'DHCP not enabled on adapter'
2147786788 = 'Write lock not enabled'
}
$returnValueName[[int]$result.ReturnValue]
}This method can change the system. The -WhatIf parameter shows the operation without running it: remove it only after checking.
EnableWINS static#
Enables WINS settings specific to TCP/IP, but independent of the network adapter.
uint32 EnableWINS(
[in] boolean DNSEnabledForWINSResolution,
[in] boolean WINSEnableLMHostsLookup,
[in] string WINSHostLookupFile,
[in] string WINSScopeID
);Parameters
| Parameter | Type | Direction | Description |
|---|---|---|---|
| DNSEnabledForWINSResolution | boolean | in | If true, the Domain Name System (DNS) is enabled for name resolution over WINS resolution. |
| WINSEnableLMHostsLookup | boolean | in | If true, local lookup files are used. Lookup files will contain mappings of IP addresses to host names. |
| WINSHostLookupFile | string | in | Lookup files that contain mappings of IP addresses to host names. If available, the files will be found in %SystemRoot%\system32\drivers\ . |
| WINSScopeID | string | in | Scope identifier value that will be appended to the end of the computer's NetBIOS name. Systems that use the same scope identifier can communicate with this computer. |
Return values
| Value | Label | Description |
|---|---|---|
| 0 | Successful completion, no reboot required | |
| 1 | Successful completion, reboot required | |
| 64 | Method not supported on this platform | |
| 65 | Unknown failure | |
| 66 | Invalid subnet mask | |
| 67 | An error occurred while processing an Instance that was returned | |
| 68 | Invalid input parameter | |
| 69 | More than 5 gateways specified | |
| 70 | Invalid IP address | |
| 71 | Invalid gateway IP address | |
| 72 | An error occurred while accessing the Registry for the requested information | |
| 73 | Invalid domain name | |
| 74 | Invalid host name | |
| 75 | No primary/secondary WINS server defined | |
| 76 | Invalid file | |
| 77 | Invalid system path | |
| 78 | File copy failed | |
| 79 | Invalid security parameter | |
| 80 | Unable to configure TCP/IP service | |
| 81 | Unable to configure DHCP service | |
| 82 | Unable to renew DHCP lease | |
| 83 | Unable to release DHCP lease | |
| 84 | IP not enabled on adapter | |
| 85 | IPX not enabled on adapter | |
| 86 | Frame/network number bounds error | |
| 87 | Invalid frame type | |
| 88 | Invalid network number | |
| 89 | Duplicate network number | |
| 90 | Parameter out of bounds | |
| 91 | Access denied | |
| 92 | Out of memory | |
| 93 | Already exists | |
| 94 | Path, file or object not found | |
| 95 | Unable to notify service | |
| 96 | Unable to notify DNS service | |
| 97 | Interface not configurable | |
| 98 | Not all DHCP leases could be released/renewed | |
| 100 | DHCP not enabled on adapter | |
| 101..4294967295 | Other |
Call the EnableWINS method
review before running# Warning: this method can change the system. -WhatIf shows the operation without running it.
$methodParameters = @{
ClassName = 'Win32_NetworkAdapterConfiguration'
MethodName = 'EnableWINS'
Arguments = @{
DNSEnabledForWINSResolution = $false
WINSEnableLMHostsLookup = $false
WINSHostLookupFile = 'Example'
WINSScopeID = 'Example'
}
WhatIf = $true # Remove this line to actually run the method
}
$result = Invoke-CimMethod @methodParameters
# With -WhatIf nothing runs and no result is returned
if ($result) {
$returnValueName = @{
0 = 'Successful completion, no reboot required'
1 = 'Successful completion, reboot required'
64 = 'Method not supported on this platform'
65 = 'Unknown failure'
66 = 'Invalid subnet mask'
67 = 'An error occurred while processing an Instance that was returned'
68 = 'Invalid input parameter'
69 = 'More than 5 gateways specified'
70 = 'Invalid IP address'
71 = 'Invalid gateway IP address'
72 = 'An error occurred while accessing the Registry for the…'
73 = 'Invalid domain name'
74 = 'Invalid host name'
75 = 'No primary/secondary WINS server defined'
76 = 'Invalid file'
77 = 'Invalid system path'
78 = 'File copy failed'
79 = 'Invalid security parameter'
80 = 'Unable to configure TCP/IP service'
81 = 'Unable to configure DHCP service'
82 = 'Unable to renew DHCP lease'
83 = 'Unable to release DHCP lease'
84 = 'IP not enabled on adapter'
85 = 'IPX not enabled on adapter'
86 = 'Frame/network number bounds error'
87 = 'Invalid frame type'
88 = 'Invalid network number'
89 = 'Duplicate network number'
90 = 'Parameter out of bounds'
91 = 'Access denied'
92 = 'Out of memory'
93 = 'Already exists'
94 = 'Path, file or object not found'
95 = 'Unable to notify service'
96 = 'Unable to notify DNS service'
97 = 'Interface not configurable'
98 = 'Not all DHCP leases could be released/renewed'
100 = 'DHCP not enabled on adapter'
}
$returnValueName[[int]$result.ReturnValue]
}This method can change the system. The -WhatIf parameter shows the operation without running it: remove it only after checking.
ReleaseDHCPLease #
Releases the IP address bound to a specific DHCP-enabled network adapter.
uint32 ReleaseDHCPLease();Return values
| Value | Label | Description |
|---|---|---|
| 0 | Successful completion, no reboot required | |
| 1 | Successful completion, reboot required | |
| 64 | Method not supported on this platform | |
| 65 | Unknown failure | |
| 66 | Invalid subnet mask | |
| 67 | An error occurred while processing an Instance that was returned | |
| 68 | Invalid input parameter | |
| 69 | More than 5 gateways specified | More than five gateways specified. |
| 70 | Invalid IP address | |
| 71 | Invalid gateway IP address | |
| 72 | An error occurred while accessing the Registry for the requested information | |
| 73 | Invalid domain name | |
| 74 | Invalid host name | |
| 75 | No primary/secondary WINS server defined | No primary or secondary WINS server defined. |
| 76 | Invalid file | |
| 77 | Invalid system path | |
| 78 | File copy failed | |
| 79 | Invalid security parameter | |
| 80 | Unable to configure TCP/IP service | |
| 81 | Unable to configure DHCP service | |
| 82 | Unable to renew DHCP lease | |
| 83 | Unable to release DHCP lease | |
| 84 | IP not enabled on adapter | |
| 85 | IPX not enabled on adapter | |
| 86 | Frame/network number bounds error | Frame or network number bounds error. |
| 87 | Invalid frame type | |
| 88 | Invalid network number | |
| 89 | Duplicate network number | |
| 90 | Parameter out of bounds | |
| 91 | Access denied | |
| 92 | Out of memory | |
| 93 | Already exists | |
| 94 | Path, file or object not found | Path, file, or object not found. |
| 95 | Unable to notify service | |
| 96 | Unable to notify DNS service | |
| 97 | Interface not configurable | |
| 98 | Not all DHCP leases could be released/renewed | Not all DHCP leases could be released or renewed. |
| 100 | DHCP not enabled on adapter | |
| 101..4294967295 | Other |
Call the ReleaseDHCPLease method
review before running# Warning: this method can change the system. -WhatIf shows the operation without running it.
# Target instance
$instance = Get-CimInstance -ClassName Win32_NetworkAdapterConfiguration -Filter 'IPEnabled = TRUE'
$methodParameters = @{
InputObject = $instance
MethodName = 'ReleaseDHCPLease'
WhatIf = $true # Remove this line to actually run the method
}
$result = Invoke-CimMethod @methodParameters
# With -WhatIf nothing runs and no result is returned
if ($result) {
$returnValueName = @{
0 = 'Successful completion, no reboot required'
1 = 'Successful completion, reboot required'
64 = 'Method not supported on this platform'
65 = 'Unknown failure'
66 = 'Invalid subnet mask'
67 = 'An error occurred while processing an Instance that was returned'
68 = 'Invalid input parameter'
69 = 'More than 5 gateways specified'
70 = 'Invalid IP address'
71 = 'Invalid gateway IP address'
72 = 'An error occurred while accessing the Registry for the…'
73 = 'Invalid domain name'
74 = 'Invalid host name'
75 = 'No primary/secondary WINS server defined'
76 = 'Invalid file'
77 = 'Invalid system path'
78 = 'File copy failed'
79 = 'Invalid security parameter'
80 = 'Unable to configure TCP/IP service'
81 = 'Unable to configure DHCP service'
82 = 'Unable to renew DHCP lease'
83 = 'Unable to release DHCP lease'
84 = 'IP not enabled on adapter'
85 = 'IPX not enabled on adapter'
86 = 'Frame/network number bounds error'
87 = 'Invalid frame type'
88 = 'Invalid network number'
89 = 'Duplicate network number'
90 = 'Parameter out of bounds'
91 = 'Access denied'
92 = 'Out of memory'
93 = 'Already exists'
94 = 'Path, file or object not found'
95 = 'Unable to notify service'
96 = 'Unable to notify DNS service'
97 = 'Interface not configurable'
98 = 'Not all DHCP leases could be released/renewed'
100 = 'DHCP not enabled on adapter'
}
$returnValueName[[int]$result.ReturnValue]
}This method can change the system. The -WhatIf parameter shows the operation without running it: remove it only after checking.
ReleaseDHCPLeaseAll static#
Releases the IP addresses bound to all DHCP-enabled network adapters.
uint32 ReleaseDHCPLeaseAll();Return values
| Value | Label | Description |
|---|---|---|
| 0 | Successful completion, no reboot required | |
| 1 | Successful completion, reboot required | |
| 64 | Method not supported on this platform | |
| 65 | Unknown failure | |
| 66 | Invalid subnet mask | |
| 67 | An error occurred while processing an Instance that was returned | |
| 68 | Invalid input parameter | |
| 69 | More than 5 gateways specified | More than five gateways specified. |
| 70 | Invalid IP address | |
| 71 | Invalid gateway IP address | |
| 72 | An error occurred while accessing the Registry for the requested information | |
| 73 | Invalid domain name | |
| 74 | Invalid host name | |
| 75 | No primary/secondary WINS server defined | No primary or secondary WINS server defined. |
| 76 | Invalid file | |
| 77 | Invalid system path | |
| 78 | File copy failed | |
| 79 | Invalid security parameter | |
| 80 | Unable to configure TCP/IP service | |
| 81 | Unable to configure DHCP service | |
| 82 | Unable to renew DHCP lease | |
| 83 | Unable to release DHCP lease | |
| 84 | IP not enabled on adapter | |
| 85 | IPX not enabled on adapter | |
| 86 | Frame/network number bounds error | Frame or network number bounds error. |
| 87 | Invalid frame type | |
| 88 | Invalid network number | |
| 89 | Duplicate network number | |
| 90 | Parameter out of bounds | |
| 91 | Access denied | |
| 92 | Out of memory | |
| 93 | Already exists | |
| 94 | Path, file or object not found | Path, file, or object not found. |
| 95 | Unable to notify service | |
| 96 | Unable to notify DNS service | |
| 97 | Interface not configurable | |
| 98 | Not all DHCP leases could be released/renewed | Not all DHCP leases could be released or renewed. |
| 100 | DHCP not enabled on adapter | |
| 101..4294967295 | Other |
Call the ReleaseDHCPLeaseAll method
review before running# Warning: this method can change the system. -WhatIf shows the operation without running it.
$methodParameters = @{
ClassName = 'Win32_NetworkAdapterConfiguration'
MethodName = 'ReleaseDHCPLeaseAll'
WhatIf = $true # Remove this line to actually run the method
}
$result = Invoke-CimMethod @methodParameters
# With -WhatIf nothing runs and no result is returned
if ($result) {
$returnValueName = @{
0 = 'Successful completion, no reboot required'
1 = 'Successful completion, reboot required'
64 = 'Method not supported on this platform'
65 = 'Unknown failure'
66 = 'Invalid subnet mask'
67 = 'An error occurred while processing an Instance that was returned'
68 = 'Invalid input parameter'
69 = 'More than 5 gateways specified'
70 = 'Invalid IP address'
71 = 'Invalid gateway IP address'
72 = 'An error occurred while accessing the Registry for the…'
73 = 'Invalid domain name'
74 = 'Invalid host name'
75 = 'No primary/secondary WINS server defined'
76 = 'Invalid file'
77 = 'Invalid system path'
78 = 'File copy failed'
79 = 'Invalid security parameter'
80 = 'Unable to configure TCP/IP service'
81 = 'Unable to configure DHCP service'
82 = 'Unable to renew DHCP lease'
83 = 'Unable to release DHCP lease'
84 = 'IP not enabled on adapter'
85 = 'IPX not enabled on adapter'
86 = 'Frame/network number bounds error'
87 = 'Invalid frame type'
88 = 'Invalid network number'
89 = 'Duplicate network number'
90 = 'Parameter out of bounds'
91 = 'Access denied'
92 = 'Out of memory'
93 = 'Already exists'
94 = 'Path, file or object not found'
95 = 'Unable to notify service'
96 = 'Unable to notify DNS service'
97 = 'Interface not configurable'
98 = 'Not all DHCP leases could be released/renewed'
100 = 'DHCP not enabled on adapter'
}
$returnValueName[[int]$result.ReturnValue]
}This method can change the system. The -WhatIf parameter shows the operation without running it: remove it only after checking.
RenewDHCPLease #
Renews the IP address on specific DHCP-enabled network adapters.
uint32 RenewDHCPLease();Return values
| Value | Label | Description |
|---|---|---|
| 0 | Successful completion, no reboot required | |
| 1 | Successful completion, reboot required | |
| 64 | Method not supported on this platform | |
| 65 | Unknown failure | |
| 66 | Invalid subnet mask | |
| 67 | An error occurred while processing an Instance that was returned | |
| 68 | Invalid input parameter | |
| 69 | More than 5 gateways specified | More than five gateways specified. |
| 70 | Invalid IP address | |
| 71 | Invalid gateway IP address | |
| 72 | An error occurred while accessing the Registry for the requested information | |
| 73 | Invalid domain name | |
| 74 | Invalid host name | |
| 75 | No primary/secondary WINS server defined | No primary or secondary WINS server defined. |
| 76 | Invalid file | |
| 77 | Invalid system path | |
| 78 | File copy failed | |
| 79 | Invalid security parameter | |
| 80 | Unable to configure TCP/IP service | |
| 81 | Unable to configure DHCP service | |
| 82 | Unable to renew DHCP lease | |
| 83 | Unable to release DHCP lease | |
| 84 | IP not enabled on adapter | |
| 85 | IPX not enabled on adapter | |
| 86 | Frame/network number bounds error | Frame or network number bounds error. |
| 87 | Invalid frame type | |
| 88 | Invalid network number | |
| 89 | Duplicate network number | |
| 90 | Parameter out of bounds | |
| 91 | Access denied | |
| 92 | Out of memory | |
| 93 | Already exists | |
| 94 | Path, file or object not found | Path, file, or object not found. |
| 95 | Unable to notify service | |
| 96 | Unable to notify DNS service | |
| 97 | Interface not configurable | |
| 98 | Not all DHCP leases could be released/renewed | Not all DHCP leases could be released or renewed. |
| 100 | DHCP not enabled on adapter | |
| 101..4294967295 | Other |
Call the RenewDHCPLease method
review before running# Warning: this method can change the system. -WhatIf shows the operation without running it.
# Target instance
$instance = Get-CimInstance -ClassName Win32_NetworkAdapterConfiguration -Filter 'IPEnabled = TRUE'
$methodParameters = @{
InputObject = $instance
MethodName = 'RenewDHCPLease'
WhatIf = $true # Remove this line to actually run the method
}
$result = Invoke-CimMethod @methodParameters
# With -WhatIf nothing runs and no result is returned
if ($result) {
$returnValueName = @{
0 = 'Successful completion, no reboot required'
1 = 'Successful completion, reboot required'
64 = 'Method not supported on this platform'
65 = 'Unknown failure'
66 = 'Invalid subnet mask'
67 = 'An error occurred while processing an Instance that was returned'
68 = 'Invalid input parameter'
69 = 'More than 5 gateways specified'
70 = 'Invalid IP address'
71 = 'Invalid gateway IP address'
72 = 'An error occurred while accessing the Registry for the…'
73 = 'Invalid domain name'
74 = 'Invalid host name'
75 = 'No primary/secondary WINS server defined'
76 = 'Invalid file'
77 = 'Invalid system path'
78 = 'File copy failed'
79 = 'Invalid security parameter'
80 = 'Unable to configure TCP/IP service'
81 = 'Unable to configure DHCP service'
82 = 'Unable to renew DHCP lease'
83 = 'Unable to release DHCP lease'
84 = 'IP not enabled on adapter'
85 = 'IPX not enabled on adapter'
86 = 'Frame/network number bounds error'
87 = 'Invalid frame type'
88 = 'Invalid network number'
89 = 'Duplicate network number'
90 = 'Parameter out of bounds'
91 = 'Access denied'
92 = 'Out of memory'
93 = 'Already exists'
94 = 'Path, file or object not found'
95 = 'Unable to notify service'
96 = 'Unable to notify DNS service'
97 = 'Interface not configurable'
98 = 'Not all DHCP leases could be released/renewed'
100 = 'DHCP not enabled on adapter'
}
$returnValueName[[int]$result.ReturnValue]
}This method can change the system. The -WhatIf parameter shows the operation without running it: remove it only after checking.
RenewDHCPLeaseAll static#
Renews the IP addresses on all DHCP-enabled network adapters.
uint32 RenewDHCPLeaseAll();Return values
| Value | Label | Description |
|---|---|---|
| 0 | Successful completion, no reboot required | |
| 1 | Successful completion, reboot required | |
| 64 | Method not supported on this platform | |
| 65 | Unknown failure | |
| 66 | Invalid subnet mask | |
| 67 | An error occurred while processing an Instance that was returned | |
| 68 | Invalid input parameter | |
| 69 | More than 5 gateways specified | More than five gateways specified. |
| 70 | Invalid IP address | |
| 71 | Invalid gateway IP address | |
| 72 | An error occurred while accessing the Registry for the requested information | |
| 73 | Invalid domain name | |
| 74 | Invalid host name | |
| 75 | No primary/secondary WINS server defined | No primary or secondary WINS server defined. |
| 76 | Invalid file | |
| 77 | Invalid system path | |
| 78 | File copy failed | |
| 79 | Invalid security parameter | |
| 80 | Unable to configure TCP/IP service | |
| 81 | Unable to configure DHCP service | |
| 82 | Unable to renew DHCP lease | |
| 83 | Unable to release DHCP lease | |
| 84 | IP not enabled on adapter | |
| 85 | IPX not enabled on adapter | |
| 86 | Frame/network number bounds error | Frame or network number bounds error. |
| 87 | Invalid frame type | |
| 88 | Invalid network number | |
| 89 | Duplicate network number | |
| 90 | Parameter out of bounds | |
| 91 | Access denied | |
| 92 | Out of memory | |
| 93 | Already exists | |
| 94 | Path, file or object not found | Path, file, or object not found. |
| 95 | Unable to notify service | |
| 96 | Unable to notify DNS service | |
| 97 | Interface not configurable | |
| 98 | Not all DHCP leases could be released/renewed | Not all DHCP leases could be released or renewed. |
| 100 | DHCP not enabled on adapter | |
| 101..4294967295 | Other |
Call the RenewDHCPLeaseAll method
review before running# Warning: this method can change the system. -WhatIf shows the operation without running it.
$methodParameters = @{
ClassName = 'Win32_NetworkAdapterConfiguration'
MethodName = 'RenewDHCPLeaseAll'
WhatIf = $true # Remove this line to actually run the method
}
$result = Invoke-CimMethod @methodParameters
# With -WhatIf nothing runs and no result is returned
if ($result) {
$returnValueName = @{
0 = 'Successful completion, no reboot required'
1 = 'Successful completion, reboot required'
64 = 'Method not supported on this platform'
65 = 'Unknown failure'
66 = 'Invalid subnet mask'
67 = 'An error occurred while processing an Instance that was returned'
68 = 'Invalid input parameter'
69 = 'More than 5 gateways specified'
70 = 'Invalid IP address'
71 = 'Invalid gateway IP address'
72 = 'An error occurred while accessing the Registry for the…'
73 = 'Invalid domain name'
74 = 'Invalid host name'
75 = 'No primary/secondary WINS server defined'
76 = 'Invalid file'
77 = 'Invalid system path'
78 = 'File copy failed'
79 = 'Invalid security parameter'
80 = 'Unable to configure TCP/IP service'
81 = 'Unable to configure DHCP service'
82 = 'Unable to renew DHCP lease'
83 = 'Unable to release DHCP lease'
84 = 'IP not enabled on adapter'
85 = 'IPX not enabled on adapter'
86 = 'Frame/network number bounds error'
87 = 'Invalid frame type'
88 = 'Invalid network number'
89 = 'Duplicate network number'
90 = 'Parameter out of bounds'
91 = 'Access denied'
92 = 'Out of memory'
93 = 'Already exists'
94 = 'Path, file or object not found'
95 = 'Unable to notify service'
96 = 'Unable to notify DNS service'
97 = 'Interface not configurable'
98 = 'Not all DHCP leases could be released/renewed'
100 = 'DHCP not enabled on adapter'
}
$returnValueName[[int]$result.ReturnValue]
}This method can change the system. The -WhatIf parameter shows the operation without running it: remove it only after checking.
SetArpAlwaysSourceRoute static#
Sets the transmission of ARP queries by the TCP/IP.
uint32 SetArpAlwaysSourceRoute([in] boolean ArpAlwaysSourceRoute);Parameters
| Parameter | Type | Direction | Description |
|---|---|---|---|
| ArpAlwaysSourceRoute | boolean | in | If true, TCP/IP is forced to transmit ARP queries with source routing enabled on Token Ring networks. By default, the stack transmits ARP queries without source routing first, then retries with source routing enabled if no reply is received. |
Return values
| Value | Label | Description |
|---|---|---|
| 0 | Successful completion, no reboot required | |
| 1 | Successful completion, reboot required | |
| 64 | Method not supported on this platform | |
| 65 | Unknown failure | |
| 66 | Invalid subnet mask | |
| 67 | An error occurred while processing an Instance that was returned | |
| 68 | Invalid input parameter | |
| 69 | More than 5 gateways specified | More than five gateways specified. |
| 70 | Invalid IP address | |
| 71 | Invalid gateway IP address | |
| 72 | An error occurred while accessing the Registry for the requested information | |
| 73 | Invalid domain name | |
| 74 | Invalid host name | |
| 75 | No primary/secondary WINS server defined | No primary or secondary WINS server defined. |
| 76 | Invalid file | |
| 77 | Invalid system path | |
| 78 | File copy failed | |
| 79 | Invalid security parameter | |
| 80 | Unable to configure TCP/IP service | |
| 81 | Unable to configure DHCP service | |
| 82 | Unable to renew DHCP lease | |
| 83 | Unable to release DHCP lease | |
| 84 | IP not enabled on adapter | |
| 85 | IPX not enabled on adapter | |
| 86 | Frame/network number bounds error | Frame or network number bounds error. |
| 87 | Invalid frame type | |
| 88 | Invalid network number | |
| 89 | Duplicate network number | |
| 90 | Parameter out of bounds | |
| 91 | Access denied | |
| 92 | Out of memory | |
| 93 | Already exists | |
| 94 | Path, file or object not found | Path, file, or object not found. |
| 95 | Unable to notify service | |
| 96 | Unable to notify DNS service | |
| 97 | Interface not configurable | |
| 98 | Not all DHCP leases could be released/renewed | Not all DHCP leases could be released or renewed. |
| 100 | DHCP not enabled on adapter | |
| 101..4294967295 | Other |
Call the SetArpAlwaysSourceRoute method
review before running# Warning: this method can change the system. -WhatIf shows the operation without running it.
$methodParameters = @{
ClassName = 'Win32_NetworkAdapterConfiguration'
MethodName = 'SetArpAlwaysSourceRoute'
Arguments = @{ ArpAlwaysSourceRoute = $false }
WhatIf = $true # Remove this line to actually run the method
}
$result = Invoke-CimMethod @methodParameters
# With -WhatIf nothing runs and no result is returned
if ($result) {
$returnValueName = @{
0 = 'Successful completion, no reboot required'
1 = 'Successful completion, reboot required'
64 = 'Method not supported on this platform'
65 = 'Unknown failure'
66 = 'Invalid subnet mask'
67 = 'An error occurred while processing an Instance that was returned'
68 = 'Invalid input parameter'
69 = 'More than 5 gateways specified'
70 = 'Invalid IP address'
71 = 'Invalid gateway IP address'
72 = 'An error occurred while accessing the Registry for the…'
73 = 'Invalid domain name'
74 = 'Invalid host name'
75 = 'No primary/secondary WINS server defined'
76 = 'Invalid file'
77 = 'Invalid system path'
78 = 'File copy failed'
79 = 'Invalid security parameter'
80 = 'Unable to configure TCP/IP service'
81 = 'Unable to configure DHCP service'
82 = 'Unable to renew DHCP lease'
83 = 'Unable to release DHCP lease'
84 = 'IP not enabled on adapter'
85 = 'IPX not enabled on adapter'
86 = 'Frame/network number bounds error'
87 = 'Invalid frame type'
88 = 'Invalid network number'
89 = 'Duplicate network number'
90 = 'Parameter out of bounds'
91 = 'Access denied'
92 = 'Out of memory'
93 = 'Already exists'
94 = 'Path, file or object not found'
95 = 'Unable to notify service'
96 = 'Unable to notify DNS service'
97 = 'Interface not configurable'
98 = 'Not all DHCP leases could be released/renewed'
100 = 'DHCP not enabled on adapter'
}
$returnValueName[[int]$result.ReturnValue]
}This method can change the system. The -WhatIf parameter shows the operation without running it: remove it only after checking.
SetArpUseEtherSNAP static#
Enables Ethernet packets to use 802.3 SNAP encoding.
uint32 SetArpUseEtherSNAP([in] boolean ArpUseEtherSNAP);Parameters
| Parameter | Type | Direction | Description |
|---|---|---|---|
| ArpUseEtherSNAP | boolean | in | If true enables TCP/IP to transmit Ethernet packets using 802.3 SNAP encoding. |
Return values
| Value | Label | Description |
|---|---|---|
| 0 | Successful completion, no reboot required | |
| 1 | Successful completion, reboot required | |
| 64 | Method not supported on this platform | |
| 65 | Unknown failure | |
| 66 | Invalid subnet mask | |
| 67 | An error occurred while processing an Instance that was returned | |
| 68 | Invalid input parameter | |
| 69 | More than 5 gateways specified | More than five gateways specified. |
| 70 | Invalid IP address | |
| 71 | Invalid gateway IP address | |
| 72 | An error occurred while accessing the Registry for the requested information | |
| 73 | Invalid domain name | |
| 74 | Invalid host name | |
| 75 | No primary/secondary WINS server defined | No primary or secondary WINS server defined. |
| 76 | Invalid file | |
| 77 | Invalid system path | |
| 78 | File copy failed | |
| 79 | Invalid security parameter | |
| 80 | Unable to configure TCP/IP service | |
| 81 | Unable to configure DHCP service | |
| 82 | Unable to renew DHCP lease | |
| 83 | Unable to release DHCP lease | |
| 84 | IP not enabled on adapter | |
| 85 | IPX not enabled on adapter | |
| 86 | Frame/network number bounds error | Frame or network number bounds error. |
| 87 | Invalid frame type | |
| 88 | Invalid network number | |
| 89 | Duplicate network number | |
| 90 | Parameter out of bounds | |
| 91 | Access denied | |
| 92 | Out of memory | |
| 93 | Already exists | |
| 94 | Path, file or object not found | Path, file, or object not found. |
| 95 | Unable to notify service | |
| 96 | Unable to notify DNS service | |
| 97 | Interface not configurable | |
| 98 | Not all DHCP leases could be released/renewed | Not all DHCP leases could be released or renewed. |
| 100 | DHCP not enabled on adapter | |
| 101..4294967295 | Other |
Call the SetArpUseEtherSNAP method
review before running# Warning: this method can change the system. -WhatIf shows the operation without running it.
$methodParameters = @{
ClassName = 'Win32_NetworkAdapterConfiguration'
MethodName = 'SetArpUseEtherSNAP'
Arguments = @{ ArpUseEtherSNAP = $false }
WhatIf = $true # Remove this line to actually run the method
}
$result = Invoke-CimMethod @methodParameters
# With -WhatIf nothing runs and no result is returned
if ($result) {
$returnValueName = @{
0 = 'Successful completion, no reboot required'
1 = 'Successful completion, reboot required'
64 = 'Method not supported on this platform'
65 = 'Unknown failure'
66 = 'Invalid subnet mask'
67 = 'An error occurred while processing an Instance that was returned'
68 = 'Invalid input parameter'
69 = 'More than 5 gateways specified'
70 = 'Invalid IP address'
71 = 'Invalid gateway IP address'
72 = 'An error occurred while accessing the Registry for the…'
73 = 'Invalid domain name'
74 = 'Invalid host name'
75 = 'No primary/secondary WINS server defined'
76 = 'Invalid file'
77 = 'Invalid system path'
78 = 'File copy failed'
79 = 'Invalid security parameter'
80 = 'Unable to configure TCP/IP service'
81 = 'Unable to configure DHCP service'
82 = 'Unable to renew DHCP lease'
83 = 'Unable to release DHCP lease'
84 = 'IP not enabled on adapter'
85 = 'IPX not enabled on adapter'
86 = 'Frame/network number bounds error'
87 = 'Invalid frame type'
88 = 'Invalid network number'
89 = 'Duplicate network number'
90 = 'Parameter out of bounds'
91 = 'Access denied'
92 = 'Out of memory'
93 = 'Already exists'
94 = 'Path, file or object not found'
95 = 'Unable to notify service'
96 = 'Unable to notify DNS service'
97 = 'Interface not configurable'
98 = 'Not all DHCP leases could be released/renewed'
100 = 'DHCP not enabled on adapter'
}
$returnValueName[[int]$result.ReturnValue]
}This method can change the system. The -WhatIf parameter shows the operation without running it: remove it only after checking.
SetDatabasePath static#
Sets the path to the standard Internet database files (HOSTS, LMHOSTS, NETWORKS, and PROTOCOLS).
uint32 SetDatabasePath([in] string DatabasePath);Parameters
| Parameter | Type | Direction | Description |
|---|---|---|---|
| DatabasePath | string | in | Valid file path to standard Internet database files (HOSTS, LMHOSTS, NETWORKS, and PROTOCOLS) used by the Windows Sockets interface. |
Return values
| Value | Label | Description |
|---|---|---|
| 0 | Successful completion, no reboot required | |
| 1 | Successful completion, reboot required | |
| 64 | Method not supported on this platform | |
| 65 | Unknown failure | |
| 66 | Invalid subnet mask | |
| 67 | An error occurred while processing an Instance that was returned | |
| 68 | Invalid input parameter | |
| 69 | More than 5 gateways specified | More than five gateways specified. |
| 70 | Invalid IP address | |
| 71 | Invalid gateway IP address | |
| 72 | An error occurred while accessing the Registry for the requested information | |
| 73 | Invalid domain name | |
| 74 | Invalid host name | |
| 75 | No primary/secondary WINS server defined | No primary or secondary WINS server defined. |
| 76 | Invalid file | |
| 77 | Invalid system path | |
| 78 | File copy failed | |
| 79 | Invalid security parameter | |
| 80 | Unable to configure TCP/IP service | |
| 81 | Unable to configure DHCP service | |
| 82 | Unable to renew DHCP lease | |
| 83 | Unable to release DHCP lease | |
| 84 | IP not enabled on adapter | |
| 85 | IPX not enabled on adapter | |
| 86 | Frame/network number bounds error | Frame or network number bounds error. |
| 87 | Invalid frame type | |
| 88 | Invalid network number | |
| 89 | Duplicate network number | |
| 90 | Parameter out of bounds | |
| 91 | Access denied | |
| 92 | Out of memory | |
| 93 | Already exists | |
| 94 | Path, file or object not found | Path, file, or object not found. |
| 95 | Unable to notify service | |
| 96 | Unable to notify DNS service | |
| 97 | Interface not configurable | |
| 98 | Not all DHCP leases could be released/renewed | Not all DHCP leases could be released or renewed. |
| 100 | DHCP not enabled on adapter | |
| 101..4294967295 | Other |
Call the SetDatabasePath method
review before running# Warning: this method can change the system. -WhatIf shows the operation without running it.
$methodParameters = @{
ClassName = 'Win32_NetworkAdapterConfiguration'
MethodName = 'SetDatabasePath'
Arguments = @{ DatabasePath = 'Example' }
WhatIf = $true # Remove this line to actually run the method
}
$result = Invoke-CimMethod @methodParameters
# With -WhatIf nothing runs and no result is returned
if ($result) {
$returnValueName = @{
0 = 'Successful completion, no reboot required'
1 = 'Successful completion, reboot required'
64 = 'Method not supported on this platform'
65 = 'Unknown failure'
66 = 'Invalid subnet mask'
67 = 'An error occurred while processing an Instance that was returned'
68 = 'Invalid input parameter'
69 = 'More than 5 gateways specified'
70 = 'Invalid IP address'
71 = 'Invalid gateway IP address'
72 = 'An error occurred while accessing the Registry for the…'
73 = 'Invalid domain name'
74 = 'Invalid host name'
75 = 'No primary/secondary WINS server defined'
76 = 'Invalid file'
77 = 'Invalid system path'
78 = 'File copy failed'
79 = 'Invalid security parameter'
80 = 'Unable to configure TCP/IP service'
81 = 'Unable to configure DHCP service'
82 = 'Unable to renew DHCP lease'
83 = 'Unable to release DHCP lease'
84 = 'IP not enabled on adapter'
85 = 'IPX not enabled on adapter'
86 = 'Frame/network number bounds error'
87 = 'Invalid frame type'
88 = 'Invalid network number'
89 = 'Duplicate network number'
90 = 'Parameter out of bounds'
91 = 'Access denied'
92 = 'Out of memory'
93 = 'Already exists'
94 = 'Path, file or object not found'
95 = 'Unable to notify service'
96 = 'Unable to notify DNS service'
97 = 'Interface not configurable'
98 = 'Not all DHCP leases could be released/renewed'
100 = 'DHCP not enabled on adapter'
}
$returnValueName[[int]$result.ReturnValue]
}This method can change the system. The -WhatIf parameter shows the operation without running it: remove it only after checking.
SetDeadGWDetect static#
Enables dead gateway detection.
uint32 SetDeadGWDetect([in] boolean DeadGWDetectEnabled);Parameters
| Parameter | Type | Direction | Description |
|---|---|---|---|
| DeadGWDetectEnabled | boolean | in | If true, dead gateway detection should be enabled. |
Return values
| Value | Label | Description |
|---|---|---|
| 0 | Successful completion, no reboot required | |
| 1 | Successful completion, reboot required | |
| 64 | Method not supported on this platform | |
| 65 | Unknown failure | |
| 66 | Invalid subnet mask | |
| 67 | An error occurred while processing an Instance that was returned | |
| 68 | Invalid input parameter | |
| 69 | More than 5 gateways specified | More than five gateways specified. |
| 70 | Invalid IP address | |
| 71 | Invalid gateway IP address | |
| 72 | An error occurred while accessing the Registry for the requested information | |
| 73 | Invalid domain name | |
| 74 | Invalid host name | |
| 75 | No primary/secondary WINS server defined | No primary or secondary WINS server defined. |
| 76 | Invalid file | |
| 77 | Invalid system path | |
| 78 | File copy failed | |
| 79 | Invalid security parameter | |
| 80 | Unable to configure TCP/IP service | |
| 81 | Unable to configure DHCP service | |
| 82 | Unable to renew DHCP lease | |
| 83 | Unable to release DHCP lease | |
| 84 | IP not enabled on adapter | |
| 85 | IPX not enabled on adapter | |
| 86 | Frame/network number bounds error | Frame or network number bounds error. |
| 87 | Invalid frame type | |
| 88 | Invalid network number | |
| 89 | Duplicate network number | |
| 90 | Parameter out of bounds | |
| 91 | Access denied | |
| 92 | Out of memory | |
| 93 | Already exists | |
| 94 | Path, file or object not found | Path, file, or object not found. |
| 95 | Unable to notify service | |
| 96 | Unable to notify DNS service | |
| 97 | Interface not configurable | |
| 98 | Not all DHCP leases could be released/renewed | Not all DHCP leases could be released or renewed. |
| 100 | DHCP not enabled on adapter | |
| 101..4294967295 | Other |
Call the SetDeadGWDetect method
review before running# Warning: this method can change the system. -WhatIf shows the operation without running it.
$methodParameters = @{
ClassName = 'Win32_NetworkAdapterConfiguration'
MethodName = 'SetDeadGWDetect'
Arguments = @{ DeadGWDetectEnabled = $false }
WhatIf = $true # Remove this line to actually run the method
}
$result = Invoke-CimMethod @methodParameters
# With -WhatIf nothing runs and no result is returned
if ($result) {
$returnValueName = @{
0 = 'Successful completion, no reboot required'
1 = 'Successful completion, reboot required'
64 = 'Method not supported on this platform'
65 = 'Unknown failure'
66 = 'Invalid subnet mask'
67 = 'An error occurred while processing an Instance that was returned'
68 = 'Invalid input parameter'
69 = 'More than 5 gateways specified'
70 = 'Invalid IP address'
71 = 'Invalid gateway IP address'
72 = 'An error occurred while accessing the Registry for the…'
73 = 'Invalid domain name'
74 = 'Invalid host name'
75 = 'No primary/secondary WINS server defined'
76 = 'Invalid file'
77 = 'Invalid system path'
78 = 'File copy failed'
79 = 'Invalid security parameter'
80 = 'Unable to configure TCP/IP service'
81 = 'Unable to configure DHCP service'
82 = 'Unable to renew DHCP lease'
83 = 'Unable to release DHCP lease'
84 = 'IP not enabled on adapter'
85 = 'IPX not enabled on adapter'
86 = 'Frame/network number bounds error'
87 = 'Invalid frame type'
88 = 'Invalid network number'
89 = 'Duplicate network number'
90 = 'Parameter out of bounds'
91 = 'Access denied'
92 = 'Out of memory'
93 = 'Already exists'
94 = 'Path, file or object not found'
95 = 'Unable to notify service'
96 = 'Unable to notify DNS service'
97 = 'Interface not configurable'
98 = 'Not all DHCP leases could be released/renewed'
100 = 'DHCP not enabled on adapter'
}
$returnValueName[[int]$result.ReturnValue]
}This method can change the system. The -WhatIf parameter shows the operation without running it: remove it only after checking.
SetDefaultTOS static#
Obsolete. This method sets the default Type of Service (TOS) value in the header of outgoing IP packets.
uint32 SetDefaultTOS([in] uint8 DefaultTOS);Parameters
| Parameter | Type | Direction | Description |
|---|---|---|---|
| DefaultTOS | uint8 | in | Type of Service (TOS) value put in the header of outgoing IP packets. For a definition of the values, see RFC 791. |
Return values
| Value | Label | Description |
|---|---|---|
| 0 | Successful completion, no reboot required | |
| 1 | Successful completion, reboot required | |
| 64 | Method not supported on this platform | |
| 65 | Unknown failure | |
| 66 | Invalid subnet mask | |
| 67 | An error occurred while processing an Instance that was returned | |
| 68 | Invalid input parameter | |
| 69 | More than 5 gateways specified | More than five gateways specified. |
| 70 | Invalid IP address | |
| 71 | Invalid gateway IP address | |
| 72 | An error occurred while accessing the Registry for the requested information | |
| 73 | Invalid domain name | |
| 74 | Invalid host name | |
| 75 | No primary/secondary WINS server defined | No primary or secondary WINS server defined. |
| 76 | Invalid file | |
| 77 | Invalid system path | |
| 78 | File copy failed | |
| 79 | Invalid security parameter | |
| 80 | Unable to configure TCP/IP service | |
| 81 | Unable to configure DHCP service | |
| 82 | Unable to renew DHCP lease | |
| 83 | Unable to release DHCP lease | |
| 84 | IP not enabled on adapter | |
| 85 | IPX not enabled on adapter | |
| 86 | Frame/network number bounds error | Frame or network number bounds error. |
| 87 | Invalid frame type | |
| 88 | Invalid network number | |
| 89 | Duplicate network number | |
| 90 | Parameter out of bounds | |
| 91 | Access denied | |
| 92 | Out of memory | |
| 93 | Already exists | |
| 94 | Path, file or object not found | Path, file, or object not found. |
| 95 | Unable to notify service | |
| 96 | Unable to notify DNS service | |
| 97 | Interface not configurable | |
| 98 | Not all DHCP leases could be released/renewed | Not all DHCP leases could be released or renewed. |
| 100 | DHCP not enabled on adapter | |
| 101..4294967295 | Other |
Call the SetDefaultTOS method
review before running# Warning: this method can change the system. -WhatIf shows the operation without running it.
$methodParameters = @{
ClassName = 'Win32_NetworkAdapterConfiguration'
MethodName = 'SetDefaultTOS'
Arguments = @{ DefaultTOS = 0 }
WhatIf = $true # Remove this line to actually run the method
}
$result = Invoke-CimMethod @methodParameters
# With -WhatIf nothing runs and no result is returned
if ($result) {
$returnValueName = @{
0 = 'Successful completion, no reboot required'
1 = 'Successful completion, reboot required'
64 = 'Method not supported on this platform'
65 = 'Unknown failure'
66 = 'Invalid subnet mask'
67 = 'An error occurred while processing an Instance that was returned'
68 = 'Invalid input parameter'
69 = 'More than 5 gateways specified'
70 = 'Invalid IP address'
71 = 'Invalid gateway IP address'
72 = 'An error occurred while accessing the Registry for the…'
73 = 'Invalid domain name'
74 = 'Invalid host name'
75 = 'No primary/secondary WINS server defined'
76 = 'Invalid file'
77 = 'Invalid system path'
78 = 'File copy failed'
79 = 'Invalid security parameter'
80 = 'Unable to configure TCP/IP service'
81 = 'Unable to configure DHCP service'
82 = 'Unable to renew DHCP lease'
83 = 'Unable to release DHCP lease'
84 = 'IP not enabled on adapter'
85 = 'IPX not enabled on adapter'
86 = 'Frame/network number bounds error'
87 = 'Invalid frame type'
88 = 'Invalid network number'
89 = 'Duplicate network number'
90 = 'Parameter out of bounds'
91 = 'Access denied'
92 = 'Out of memory'
93 = 'Already exists'
94 = 'Path, file or object not found'
95 = 'Unable to notify service'
96 = 'Unable to notify DNS service'
97 = 'Interface not configurable'
98 = 'Not all DHCP leases could be released/renewed'
100 = 'DHCP not enabled on adapter'
}
$returnValueName[[int]$result.ReturnValue]
}This method can change the system. The -WhatIf parameter shows the operation without running it: remove it only after checking.
SetDefaultTTL static#
Sets the default Time to Live (TTL) value in the header of outgoing IP packets.
uint32 SetDefaultTTL([in] uint8 DefaultTTL);Parameters
| Parameter | Type | Direction | Description |
|---|---|---|---|
| DefaultTTL | uint8 | in | Time to Live value set in the header of outgoing IP packets. The default value is 32; Valid range: 1 - 255 |
Return values
| Value | Label | Description |
|---|---|---|
| 0 | Successful completion, no reboot required | |
| 1 | Successful completion, reboot required | |
| 64 | Method not supported on this platform | |
| 65 | Unknown failure | |
| 66 | Invalid subnet mask | |
| 67 | An error occurred while processing an Instance that was returned | |
| 68 | Invalid input parameter | |
| 69 | More than 5 gateways specified | More than five gateways specified. |
| 70 | Invalid IP address | |
| 71 | Invalid gateway IP address | |
| 72 | An error occurred while accessing the Registry for the requested information | |
| 73 | Invalid domain name | |
| 74 | Invalid host name | |
| 75 | No primary/secondary WINS server defined | No primary or secondary WINS server defined. |
| 76 | Invalid file | |
| 77 | Invalid system path | |
| 78 | File copy failed | |
| 79 | Invalid security parameter | |
| 80 | Unable to configure TCP/IP service | |
| 81 | Unable to configure DHCP service | |
| 82 | Unable to renew DHCP lease | |
| 83 | Unable to release DHCP lease | |
| 84 | IP not enabled on adapter | |
| 85 | IPX not enabled on adapter | |
| 86 | Frame/network number bounds error | Frame or network number bounds error. |
| 87 | Invalid frame type | |
| 88 | Invalid network number | |
| 89 | Duplicate network number | |
| 90 | Parameter out of bounds | |
| 91 | Access denied | |
| 92 | Out of memory | |
| 93 | Already exists | |
| 94 | Path, file or object not found | Path, file, or object not found. |
| 95 | Unable to notify service | |
| 96 | Unable to notify DNS service | |
| 97 | Interface not configurable | |
| 98 | Not all DHCP leases could be released/renewed | Not all DHCP leases could be released or renewed. |
| 100 | DHCP not enabled on adapter | |
| 101..4294967295 | Other |
Call the SetDefaultTTL method
review before running# Warning: this method can change the system. -WhatIf shows the operation without running it.
$methodParameters = @{
ClassName = 'Win32_NetworkAdapterConfiguration'
MethodName = 'SetDefaultTTL'
Arguments = @{ DefaultTTL = 0 }
WhatIf = $true # Remove this line to actually run the method
}
$result = Invoke-CimMethod @methodParameters
# With -WhatIf nothing runs and no result is returned
if ($result) {
$returnValueName = @{
0 = 'Successful completion, no reboot required'
1 = 'Successful completion, reboot required'
64 = 'Method not supported on this platform'
65 = 'Unknown failure'
66 = 'Invalid subnet mask'
67 = 'An error occurred while processing an Instance that was returned'
68 = 'Invalid input parameter'
69 = 'More than 5 gateways specified'
70 = 'Invalid IP address'
71 = 'Invalid gateway IP address'
72 = 'An error occurred while accessing the Registry for the…'
73 = 'Invalid domain name'
74 = 'Invalid host name'
75 = 'No primary/secondary WINS server defined'
76 = 'Invalid file'
77 = 'Invalid system path'
78 = 'File copy failed'
79 = 'Invalid security parameter'
80 = 'Unable to configure TCP/IP service'
81 = 'Unable to configure DHCP service'
82 = 'Unable to renew DHCP lease'
83 = 'Unable to release DHCP lease'
84 = 'IP not enabled on adapter'
85 = 'IPX not enabled on adapter'
86 = 'Frame/network number bounds error'
87 = 'Invalid frame type'
88 = 'Invalid network number'
89 = 'Duplicate network number'
90 = 'Parameter out of bounds'
91 = 'Access denied'
92 = 'Out of memory'
93 = 'Already exists'
94 = 'Path, file or object not found'
95 = 'Unable to notify service'
96 = 'Unable to notify DNS service'
97 = 'Interface not configurable'
98 = 'Not all DHCP leases could be released/renewed'
100 = 'DHCP not enabled on adapter'
}
$returnValueName[[int]$result.ReturnValue]
}This method can change the system. The -WhatIf parameter shows the operation without running it: remove it only after checking.
SetDNSDomain #
Sets the DNS domain.
uint32 SetDNSDomain([in] string DNSDomain);Parameters
| Parameter | Type | Direction | Description |
|---|---|---|---|
| DNSDomain | string | 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 values
| Value | Label | Description |
|---|---|---|
| 0 | Successful completion, no reboot required | |
| 1 | Successful completion, reboot required | |
| 64 | Method not supported on this platform | |
| 65 | Unknown failure | |
| 66 | Invalid subnet mask | |
| 67 | An error occurred while processing an Instance that was returned | |
| 68 | Invalid input parameter | |
| 69 | More than 5 gateways specified | More than five gateways specified. |
| 70 | Invalid IP address | |
| 71 | Invalid gateway IP address | |
| 72 | An error occurred while accessing the Registry for the requested information | |
| 73 | Invalid domain name | |
| 74 | Invalid host name | |
| 75 | No primary/secondary WINS server defined | No primary or secondary WINS server defined. |
| 76 | Invalid file | |
| 77 | Invalid system path | |
| 78 | File copy failed | |
| 79 | Invalid security parameter | |
| 80 | Unable to configure TCP/IP service | |
| 81 | Unable to configure DHCP service | |
| 82 | Unable to renew DHCP lease | |
| 83 | Unable to release DHCP lease | |
| 84 | IP not enabled on adapter | |
| 85 | IPX not enabled on adapter | |
| 86 | Frame/network number bounds error | Frame or network number bounds error. |
| 87 | Invalid frame type | |
| 88 | Invalid network number | |
| 89 | Duplicate network number | |
| 90 | Parameter out of bounds | |
| 91 | Access denied | |
| 92 | Out of memory | |
| 93 | Already exists | |
| 94 | Path, file or object not found | Path, file, or object not found. |
| 95 | Unable to notify service | |
| 96 | Unable to notify DNS service | |
| 97 | Interface not configurable | |
| 98 | Not all DHCP leases could be released/renewed | Not all DHCP leases can be released or renewed. |
| 100 | DHCP not enabled on adapter | |
| 101..4294967295 | Other |
Call the SetDNSDomain method
review before running# Warning: this method can change the system. -WhatIf shows the operation without running it.
# Target instance
$instance = Get-CimInstance -ClassName Win32_NetworkAdapterConfiguration -Filter 'IPEnabled = TRUE'
$methodParameters = @{
InputObject = $instance
MethodName = 'SetDNSDomain'
Arguments = @{ DNSDomain = 'Example' }
WhatIf = $true # Remove this line to actually run the method
}
$result = Invoke-CimMethod @methodParameters
# With -WhatIf nothing runs and no result is returned
if ($result) {
$returnValueName = @{
0 = 'Successful completion, no reboot required'
1 = 'Successful completion, reboot required'
64 = 'Method not supported on this platform'
65 = 'Unknown failure'
66 = 'Invalid subnet mask'
67 = 'An error occurred while processing an Instance that was returned'
68 = 'Invalid input parameter'
69 = 'More than 5 gateways specified'
70 = 'Invalid IP address'
71 = 'Invalid gateway IP address'
72 = 'An error occurred while accessing the Registry for the…'
73 = 'Invalid domain name'
74 = 'Invalid host name'
75 = 'No primary/secondary WINS server defined'
76 = 'Invalid file'
77 = 'Invalid system path'
78 = 'File copy failed'
79 = 'Invalid security parameter'
80 = 'Unable to configure TCP/IP service'
81 = 'Unable to configure DHCP service'
82 = 'Unable to renew DHCP lease'
83 = 'Unable to release DHCP lease'
84 = 'IP not enabled on adapter'
85 = 'IPX not enabled on adapter'
86 = 'Frame/network number bounds error'
87 = 'Invalid frame type'
88 = 'Invalid network number'
89 = 'Duplicate network number'
90 = 'Parameter out of bounds'
91 = 'Access denied'
92 = 'Out of memory'
93 = 'Already exists'
94 = 'Path, file or object not found'
95 = 'Unable to notify service'
96 = 'Unable to notify DNS service'
97 = 'Interface not configurable'
98 = 'Not all DHCP leases could be released/renewed'
100 = 'DHCP not enabled on adapter'
}
$returnValueName[[int]$result.ReturnValue]
}This method can change the system. The -WhatIf parameter shows the operation without running it: remove it only after checking.
SetDNSServerSearchOrder #
Sets the server search order as an array of elements.
uint32 SetDNSServerSearchOrder([in] string[] DNSServerSearchOrder);Parameters
| Parameter | Type | Direction | Description |
|---|---|---|---|
| DNSServerSearchOrder | string[] | in | List of server IP addresses to query for DNS servers. Example: 130.215.24.1 or 157.54.164.1 |
Return values
| Value | Label | Description |
|---|---|---|
| 0 | Successful completion, no reboot required | |
| 1 | Successful completion, reboot required | |
| 64 | Method not supported on this platform | |
| 65 | Unknown failure | |
| 66 | Invalid subnet mask | |
| 67 | An error occurred while processing an Instance that was returned | |
| 68 | Invalid input parameter | |
| 69 | More than 5 gateways specified | |
| 70 | Invalid IP address | |
| 71 | Invalid gateway IP address | |
| 72 | An error occurred while accessing the Registry for the requested information | |
| 73 | Invalid domain name | |
| 74 | Invalid host name | |
| 75 | No primary/secondary WINS server defined | |
| 76 | Invalid file | |
| 77 | Invalid system path | |
| 78 | File copy failed | |
| 79 | Invalid security parameter | |
| 80 | Unable to configure TCP/IP service | |
| 81 | Unable to configure DHCP service | |
| 82 | Unable to renew DHCP lease | |
| 83 | Unable to release DHCP lease | |
| 84 | IP not enabled on adapter | |
| 85 | IPX not enabled on adapter | |
| 86 | Frame/network number bounds error | |
| 87 | Invalid frame type | |
| 88 | Invalid network number | |
| 89 | Duplicate network number | |
| 90 | Parameter out of bounds | |
| 91 | Access denied | |
| 92 | Out of memory | |
| 93 | Already exists | |
| 94 | Path, file or object not found | |
| 95 | Unable to notify service | |
| 96 | Unable to notify DNS service | |
| 97 | Interface not configurable | |
| 98 | Not all DHCP leases could be released/renewed | |
| 100 | DHCP not enabled on adapter | |
| 101..4294967295 | Other |
Call the SetDNSServerSearchOrder method
review before running# Warning: this method can change the system. -WhatIf shows the operation without running it.
# Target instance
$instance = Get-CimInstance -ClassName Win32_NetworkAdapterConfiguration -Filter 'IPEnabled = TRUE'
$methodParameters = @{
InputObject = $instance
MethodName = 'SetDNSServerSearchOrder'
Arguments = @{ DNSServerSearchOrder = @('Example') }
WhatIf = $true # Remove this line to actually run the method
}
$result = Invoke-CimMethod @methodParameters
# With -WhatIf nothing runs and no result is returned
if ($result) {
$returnValueName = @{
0 = 'Successful completion, no reboot required'
1 = 'Successful completion, reboot required'
64 = 'Method not supported on this platform'
65 = 'Unknown failure'
66 = 'Invalid subnet mask'
67 = 'An error occurred while processing an Instance that was returned'
68 = 'Invalid input parameter'
69 = 'More than 5 gateways specified'
70 = 'Invalid IP address'
71 = 'Invalid gateway IP address'
72 = 'An error occurred while accessing the Registry for the…'
73 = 'Invalid domain name'
74 = 'Invalid host name'
75 = 'No primary/secondary WINS server defined'
76 = 'Invalid file'
77 = 'Invalid system path'
78 = 'File copy failed'
79 = 'Invalid security parameter'
80 = 'Unable to configure TCP/IP service'
81 = 'Unable to configure DHCP service'
82 = 'Unable to renew DHCP lease'
83 = 'Unable to release DHCP lease'
84 = 'IP not enabled on adapter'
85 = 'IPX not enabled on adapter'
86 = 'Frame/network number bounds error'
87 = 'Invalid frame type'
88 = 'Invalid network number'
89 = 'Duplicate network number'
90 = 'Parameter out of bounds'
91 = 'Access denied'
92 = 'Out of memory'
93 = 'Already exists'
94 = 'Path, file or object not found'
95 = 'Unable to notify service'
96 = 'Unable to notify DNS service'
97 = 'Interface not configurable'
98 = 'Not all DHCP leases could be released/renewed'
100 = 'DHCP not enabled on adapter'
}
$returnValueName[[int]$result.ReturnValue]
}This method can change the system. The -WhatIf parameter shows the operation without running it: remove it only after checking.
SetDNSSuffixSearchOrder static#
Sets the suffix search order as an array of elements.
uint32 SetDNSSuffixSearchOrder([in] string[] DNSDomainSuffixSearchOrder);Parameters
| Parameter | Type | Direction | Description |
|---|---|---|---|
| DNSDomainSuffixSearchOrder | string[] | in | List of server suffixes to query for DNS servers. The registry location of the DNS suffix is HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Tcpip|NameServer Example: "suffix1.company.com", "suffix2.company.com" |
Return values
| Value | Label | Description |
|---|---|---|
| 0 | Successful completion, no reboot required | |
| 1 | Successful completion, reboot required | |
| 64 | Method not supported on this platform | |
| 65 | Unknown failure | |
| 66 | Invalid subnet mask | |
| 67 | An error occurred while processing an Instance that was returned | |
| 68 | Invalid input parameter | |
| 69 | More than 5 gateways specified | More than five gateways specified. |
| 70 | Invalid IP address | |
| 71 | Invalid gateway IP address | |
| 72 | An error occurred while accessing the Registry for the requested information | |
| 73 | Invalid domain name | |
| 74 | Invalid host name | |
| 75 | No primary/secondary WINS server defined | No primary or secondary WINS server defined. |
| 76 | Invalid file | |
| 77 | Invalid system path | |
| 78 | File copy failed | |
| 79 | Invalid security parameter | |
| 80 | Unable to configure TCP/IP service | |
| 81 | Unable to configure DHCP service | |
| 82 | Unable to renew DHCP lease | |
| 83 | Unable to release DHCP lease | |
| 84 | IP not enabled on adapter | |
| 85 | IPX not enabled on adapter | |
| 86 | Frame/network number bounds error | Frame or network number bounds error. |
| 87 | Invalid frame type | |
| 88 | Invalid network number | |
| 89 | Duplicate network number | |
| 90 | Parameter out of bounds | |
| 91 | Access denied | |
| 92 | Out of memory | |
| 93 | Already exists | |
| 94 | Path, file or object not found | Path, file, or object not found. |
| 95 | Unable to notify service | |
| 96 | Unable to notify DNS service | |
| 97 | Interface not configurable | |
| 98 | Not all DHCP leases could be released/renewed | Not all DHCP leases are released or renewed. |
| 100 | DHCP not enabled on adapter | |
| 101..4294967295 | Other |
Call the SetDNSSuffixSearchOrder method
review before running# Warning: this method can change the system. -WhatIf shows the operation without running it.
$methodParameters = @{
ClassName = 'Win32_NetworkAdapterConfiguration'
MethodName = 'SetDNSSuffixSearchOrder'
Arguments = @{ DNSDomainSuffixSearchOrder = @('Example') }
WhatIf = $true # Remove this line to actually run the method
}
$result = Invoke-CimMethod @methodParameters
# With -WhatIf nothing runs and no result is returned
if ($result) {
$returnValueName = @{
0 = 'Successful completion, no reboot required'
1 = 'Successful completion, reboot required'
64 = 'Method not supported on this platform'
65 = 'Unknown failure'
66 = 'Invalid subnet mask'
67 = 'An error occurred while processing an Instance that was returned'
68 = 'Invalid input parameter'
69 = 'More than 5 gateways specified'
70 = 'Invalid IP address'
71 = 'Invalid gateway IP address'
72 = 'An error occurred while accessing the Registry for the…'
73 = 'Invalid domain name'
74 = 'Invalid host name'
75 = 'No primary/secondary WINS server defined'
76 = 'Invalid file'
77 = 'Invalid system path'
78 = 'File copy failed'
79 = 'Invalid security parameter'
80 = 'Unable to configure TCP/IP service'
81 = 'Unable to configure DHCP service'
82 = 'Unable to renew DHCP lease'
83 = 'Unable to release DHCP lease'
84 = 'IP not enabled on adapter'
85 = 'IPX not enabled on adapter'
86 = 'Frame/network number bounds error'
87 = 'Invalid frame type'
88 = 'Invalid network number'
89 = 'Duplicate network number'
90 = 'Parameter out of bounds'
91 = 'Access denied'
92 = 'Out of memory'
93 = 'Already exists'
94 = 'Path, file or object not found'
95 = 'Unable to notify service'
96 = 'Unable to notify DNS service'
97 = 'Interface not configurable'
98 = 'Not all DHCP leases could be released/renewed'
100 = 'DHCP not enabled on adapter'
}
$returnValueName[[int]$result.ReturnValue]
}This method can change the system. The -WhatIf parameter shows the operation without running it: remove it only after checking.
SetDynamicDNSRegistration #
Indicates dynamic DNS registration of IP addresses for this IP-bound adapter.
uint32 SetDynamicDNSRegistration([in] boolean FullDNSRegistrationEnabled, [in] boolean DomainDNSRegistrationEnabled);Parameters
| Parameter | Type | Direction | Description |
|---|---|---|---|
| FullDNSRegistrationEnabled | boolean | in | If true, the IP addresses for this connection is registered in DNS under the computer's full DNS name. The full DNS name of the computer is displayed on the Network Identification tab of the system Control Panel. |
| DomainDNSRegistrationEnabled | boolean | in | If true, the IP addresses for this connection are registered under the domain name of this connection, in addition to being registered under the computer's full DNS name. The domain name of this connection is either set using the method SetDNSDomain or assigned by DHCP. The registered name is the host name of the computer with the domain name appended. This parameter has meaning only when *FullDNSRegistrationEnabled* is enabled. The default value is false. |
Return values
| Value | Label | Description |
|---|---|---|
| 0 | Successful completion, no reboot required | |
| 1 | Successful completion, reboot required | |
| 64 | Method not supported on this platform | |
| 65 | Unknown failure | |
| 66 | Invalid subnet mask | |
| 67 | An error occurred while processing an Instance that was returned | |
| 68 | Invalid input parameter | |
| 69 | More than 5 gateways specified | More than five gateways specified. |
| 70 | Invalid IP address | |
| 71 | Invalid gateway IP address | |
| 72 | An error occurred while accessing the Registry for the requested information | |
| 73 | Invalid domain name | |
| 74 | Invalid host name | |
| 75 | No primary/secondary WINS server defined | No primary or secondary WINS server defined. |
| 76 | Invalid file | |
| 77 | Invalid system path | |
| 78 | File copy failed | |
| 79 | Invalid security parameter | |
| 80 | Unable to configure TCP/IP service | |
| 81 | Unable to configure DHCP service | |
| 82 | Unable to renew DHCP lease | |
| 83 | Unable to release DHCP lease | |
| 84 | IP not enabled on adapter | |
| 85 | IPX not enabled on adapter | |
| 86 | Frame/network number bounds error | Frame or network number bounds error. |
| 87 | Invalid frame type | |
| 88 | Invalid network number | |
| 89 | Duplicate network number | |
| 90 | Parameter out of bounds | |
| 91 | Access denied | |
| 92 | Out of memory | |
| 93 | Already exists | |
| 94 | Path, file or object not found | Path, file, or object not found. |
| 95 | Unable to notify service | |
| 96 | Unable to notify DNS service | |
| 97 | Interface not configurable | |
| 98 | Not all DHCP leases could be released/renewed | Not all DHCP leases could be released or renewed. |
| 100 | DHCP not enabled on adapter | |
| 101..4294967295 | Other |
Call the SetDynamicDNSRegistration method
review before running# Warning: this method can change the system. -WhatIf shows the operation without running it.
# Target instance
$instance = Get-CimInstance -ClassName Win32_NetworkAdapterConfiguration -Filter 'IPEnabled = TRUE'
$methodParameters = @{
InputObject = $instance
MethodName = 'SetDynamicDNSRegistration'
Arguments = @{
FullDNSRegistrationEnabled = $false
DomainDNSRegistrationEnabled = $false
}
WhatIf = $true # Remove this line to actually run the method
}
$result = Invoke-CimMethod @methodParameters
# With -WhatIf nothing runs and no result is returned
if ($result) {
$returnValueName = @{
0 = 'Successful completion, no reboot required'
1 = 'Successful completion, reboot required'
64 = 'Method not supported on this platform'
65 = 'Unknown failure'
66 = 'Invalid subnet mask'
67 = 'An error occurred while processing an Instance that was returned'
68 = 'Invalid input parameter'
69 = 'More than 5 gateways specified'
70 = 'Invalid IP address'
71 = 'Invalid gateway IP address'
72 = 'An error occurred while accessing the Registry for the…'
73 = 'Invalid domain name'
74 = 'Invalid host name'
75 = 'No primary/secondary WINS server defined'
76 = 'Invalid file'
77 = 'Invalid system path'
78 = 'File copy failed'
79 = 'Invalid security parameter'
80 = 'Unable to configure TCP/IP service'
81 = 'Unable to configure DHCP service'
82 = 'Unable to renew DHCP lease'
83 = 'Unable to release DHCP lease'
84 = 'IP not enabled on adapter'
85 = 'IPX not enabled on adapter'
86 = 'Frame/network number bounds error'
87 = 'Invalid frame type'
88 = 'Invalid network number'
89 = 'Duplicate network number'
90 = 'Parameter out of bounds'
91 = 'Access denied'
92 = 'Out of memory'
93 = 'Already exists'
94 = 'Path, file or object not found'
95 = 'Unable to notify service'
96 = 'Unable to notify DNS service'
97 = 'Interface not configurable'
98 = 'Not all DHCP leases could be released/renewed'
100 = 'DHCP not enabled on adapter'
}
$returnValueName[[int]$result.ReturnValue]
}This method can change the system. The -WhatIf parameter shows the operation without running it: remove it only after checking.
SetForwardBufferMemory static#
Specifies how much memory IP allocates to store packet data in the router packet queue.
uint32 SetForwardBufferMemory([in] uint32 ForwardBufferMemory);Parameters
| Parameter | Type | Direction | Description |
|---|---|---|---|
| ForwardBufferMemory | uint32 | in | Size, in bytes, of the router packet queue used to store packet data. The default value is 74240 (fifty 1480-byte packets, rounded to a multiple of 256). |
Return values
| Value | Label | Description |
|---|---|---|
| 0 | Successful completion, no reboot required | |
| 1 | Successful completion, reboot required | |
| 64 | Method not supported on this platform | |
| 65 | Unknown failure | |
| 66 | Invalid subnet mask | |
| 67 | An error occurred while processing an Instance that was returned | |
| 68 | Invalid input parameter | |
| 69 | More than 5 gateways specified | More than five gateways specified. |
| 70 | Invalid IP address | |
| 71 | Invalid gateway IP address | |
| 72 | An error occurred while accessing the Registry for the requested information | |
| 73 | Invalid domain name | |
| 74 | Invalid host name | |
| 75 | No primary/secondary WINS server defined | No primary or secondary WINS server defined. |
| 76 | Invalid file | |
| 77 | Invalid system path | |
| 78 | File copy failed | |
| 79 | Invalid security parameter | |
| 80 | Unable to configure TCP/IP service | |
| 81 | Unable to configure DHCP service | |
| 82 | Unable to renew DHCP lease | |
| 83 | Unable to release DHCP lease | |
| 84 | IP not enabled on adapter | |
| 85 | IPX not enabled on adapter | |
| 86 | Frame/network number bounds error | Frame or network number bounds error. |
| 87 | Invalid frame type | |
| 88 | Invalid network number | |
| 89 | Duplicate network number | |
| 90 | Parameter out of bounds | |
| 91 | Access denied | |
| 92 | Out of memory | |
| 93 | Already exists | |
| 94 | Path, file or object not found | Path, file, or object not found. |
| 95 | Unable to notify service | |
| 96 | Unable to notify DNS service | |
| 97 | Interface not configurable | |
| 98 | Not all DHCP leases could be released/renewed | Not all DHCP leases could be released or renewed. |
| 100 | DHCP not enabled on adapter | |
| 101..4294967295 | Other |
Call the SetForwardBufferMemory method
review before running# Warning: this method can change the system. -WhatIf shows the operation without running it.
$methodParameters = @{
ClassName = 'Win32_NetworkAdapterConfiguration'
MethodName = 'SetForwardBufferMemory'
Arguments = @{ ForwardBufferMemory = 0 }
WhatIf = $true # Remove this line to actually run the method
}
$result = Invoke-CimMethod @methodParameters
# With -WhatIf nothing runs and no result is returned
if ($result) {
$returnValueName = @{
0 = 'Successful completion, no reboot required'
1 = 'Successful completion, reboot required'
64 = 'Method not supported on this platform'
65 = 'Unknown failure'
66 = 'Invalid subnet mask'
67 = 'An error occurred while processing an Instance that was returned'
68 = 'Invalid input parameter'
69 = 'More than 5 gateways specified'
70 = 'Invalid IP address'
71 = 'Invalid gateway IP address'
72 = 'An error occurred while accessing the Registry for the…'
73 = 'Invalid domain name'
74 = 'Invalid host name'
75 = 'No primary/secondary WINS server defined'
76 = 'Invalid file'
77 = 'Invalid system path'
78 = 'File copy failed'
79 = 'Invalid security parameter'
80 = 'Unable to configure TCP/IP service'
81 = 'Unable to configure DHCP service'
82 = 'Unable to renew DHCP lease'
83 = 'Unable to release DHCP lease'
84 = 'IP not enabled on adapter'
85 = 'IPX not enabled on adapter'
86 = 'Frame/network number bounds error'
87 = 'Invalid frame type'
88 = 'Invalid network number'
89 = 'Duplicate network number'
90 = 'Parameter out of bounds'
91 = 'Access denied'
92 = 'Out of memory'
93 = 'Already exists'
94 = 'Path, file or object not found'
95 = 'Unable to notify service'
96 = 'Unable to notify DNS service'
97 = 'Interface not configurable'
98 = 'Not all DHCP leases could be released/renewed'
100 = 'DHCP not enabled on adapter'
}
$returnValueName[[int]$result.ReturnValue]
}This method can change the system. The -WhatIf parameter shows the operation without running it: remove it only after checking.
SetGateways #
Specifies a list of gateways for routing packets destined for a different subnet than the one this adapter is connected to.
uint32 SetGateways([in] string[] DefaultIPGateway, [in] uint16[] GatewayCostMetric);Parameters
| Parameter | Type | Direction | Description |
|---|---|---|---|
| DefaultIPGateway | string[] | in | List of IP addresses to gateways where network packets are routed. |
| GatewayCostMetric | uint16[] | in | Assigns a value that ranges from 1 to 9999, which is used to calculate the fastest and most reliable routes. The values of this parameter correspond with the values in the *DefaultIPGateway* parameter. The default value for a gateway is 1. |
Return values
| Value | Label | Description |
|---|---|---|
| 0 | Successful completion, no reboot required | |
| 1 | Successful completion, reboot required | |
| 64 | Method not supported on this platform | Method not supported when the NIC is in DHCP mode. |
| 65 | Unknown failure | |
| 66 | Invalid subnet mask | |
| 67 | An error occurred while processing an Instance that was returned | |
| 68 | Invalid input parameter | |
| 69 | More than 5 gateways specified | |
| 70 | Invalid IP address | |
| 71 | Invalid gateway IP address | |
| 72 | An error occurred while accessing the Registry for the requested information | |
| 73 | Invalid domain name | |
| 74 | Invalid host name | |
| 75 | No primary/secondary WINS server defined | |
| 76 | Invalid file | |
| 77 | Invalid system path | |
| 78 | File copy failed | |
| 79 | Invalid security parameter | |
| 80 | Unable to configure TCP/IP service | |
| 81 | Unable to configure DHCP service | |
| 82 | Unable to renew DHCP lease | |
| 83 | Unable to release DHCP lease | |
| 84 | IP not enabled on adapter | |
| 85 | IPX not enabled on adapter | |
| 86 | Frame/network number bounds error | |
| 87 | Invalid frame type | |
| 88 | Invalid network number | |
| 89 | Duplicate network number | |
| 90 | Parameter out of bounds | |
| 91 | Access denied | |
| 92 | Out of memory | |
| 93 | Already exists | |
| 94 | Path, file or object not found | |
| 95 | Unable to notify service | |
| 96 | Unable to notify DNS service | |
| 97 | Interface not configurable | |
| 98 | Not all DHCP leases could be released/renewed | |
| 100 | DHCP not enabled on adapter | |
| 101..4294967295 | Other |
Call the SetGateways method
review before running# Warning: this method can change the system. -WhatIf shows the operation without running it.
# Target instance
$instance = Get-CimInstance -ClassName Win32_NetworkAdapterConfiguration -Filter 'IPEnabled = TRUE'
$methodParameters = @{
InputObject = $instance
MethodName = 'SetGateways'
Arguments = @{
DefaultIPGateway = @('Example')
GatewayCostMetric = @(0)
}
WhatIf = $true # Remove this line to actually run the method
}
$result = Invoke-CimMethod @methodParameters
# With -WhatIf nothing runs and no result is returned
if ($result) {
$returnValueName = @{
0 = 'Successful completion, no reboot required'
1 = 'Successful completion, reboot required'
64 = 'Method not supported on this platform'
65 = 'Unknown failure'
66 = 'Invalid subnet mask'
67 = 'An error occurred while processing an Instance that was returned'
68 = 'Invalid input parameter'
69 = 'More than 5 gateways specified'
70 = 'Invalid IP address'
71 = 'Invalid gateway IP address'
72 = 'An error occurred while accessing the Registry for the…'
73 = 'Invalid domain name'
74 = 'Invalid host name'
75 = 'No primary/secondary WINS server defined'
76 = 'Invalid file'
77 = 'Invalid system path'
78 = 'File copy failed'
79 = 'Invalid security parameter'
80 = 'Unable to configure TCP/IP service'
81 = 'Unable to configure DHCP service'
82 = 'Unable to renew DHCP lease'
83 = 'Unable to release DHCP lease'
84 = 'IP not enabled on adapter'
85 = 'IPX not enabled on adapter'
86 = 'Frame/network number bounds error'
87 = 'Invalid frame type'
88 = 'Invalid network number'
89 = 'Duplicate network number'
90 = 'Parameter out of bounds'
91 = 'Access denied'
92 = 'Out of memory'
93 = 'Already exists'
94 = 'Path, file or object not found'
95 = 'Unable to notify service'
96 = 'Unable to notify DNS service'
97 = 'Interface not configurable'
98 = 'Not all DHCP leases could be released/renewed'
100 = 'DHCP not enabled on adapter'
}
$returnValueName[[int]$result.ReturnValue]
}This method can change the system. The -WhatIf parameter shows the operation without running it: remove it only after checking.
SetIGMPLevel static#
Sets the extent to which the system supports IP multicasting and participates in the Internet Group Management Protocol.
uint32 SetIGMPLevel([in] uint8 IGMPLevel);Parameters
| Parameter | Type | Direction | Description |
|---|---|---|---|
| IGMPLevel | uint8 | in |
Return values
| Value | Label | Description |
|---|---|---|
| 0 | Successful completion, no reboot required | |
| 1 | Successful completion, reboot required | |
| 64 | Method not supported on this platform | |
| 65 | Unknown failure | |
| 66 | Invalid subnet mask | |
| 67 | An error occurred while processing an Instance that was returned | |
| 68 | Invalid input parameter | |
| 69 | More than 5 gateways specified | More than five gateways specified. |
| 70 | Invalid IP address | |
| 71 | Invalid gateway IP address | |
| 72 | An error occurred while accessing the Registry for the requested information | |
| 73 | Invalid domain name | |
| 74 | Invalid host name | |
| 75 | No primary/secondary WINS server defined | No primary or secondary WINS server defined. |
| 76 | Invalid file | |
| 77 | Invalid system path | |
| 78 | File copy failed | |
| 79 | Invalid security parameter | |
| 80 | Unable to configure TCP/IP service | |
| 81 | Unable to configure DHCP service | |
| 82 | Unable to renew DHCP lease | |
| 83 | Unable to release DHCP lease | |
| 84 | IP not enabled on adapter | |
| 85 | IPX not enabled on adapter | |
| 86 | Frame/network number bounds error | Frame or network number bounds error. |
| 87 | Invalid frame type | |
| 88 | Invalid network number | |
| 89 | Duplicate network number | |
| 90 | Parameter out of bounds | |
| 91 | Access denied | |
| 92 | Out of memory | |
| 93 | Already exists | |
| 94 | Path, file or object not found | Path, file, or object not found. |
| 95 | Unable to notify service | |
| 96 | Unable to notify DNS service | |
| 97 | Interface not configurable | |
| 98 | Not all DHCP leases could be released/renewed | Not all DHCP leases could be released or renewed. |
| 100 | DHCP not enabled on adapter | |
| 101..4294967295 | Other |
Call the SetIGMPLevel method
review before running# Warning: this method can change the system. -WhatIf shows the operation without running it.
$methodParameters = @{
ClassName = 'Win32_NetworkAdapterConfiguration'
MethodName = 'SetIGMPLevel'
Arguments = @{ IGMPLevel = 1 }
WhatIf = $true # Remove this line to actually run the method
}
$result = Invoke-CimMethod @methodParameters
# With -WhatIf nothing runs and no result is returned
if ($result) {
$returnValueName = @{
0 = 'Successful completion, no reboot required'
1 = 'Successful completion, reboot required'
64 = 'Method not supported on this platform'
65 = 'Unknown failure'
66 = 'Invalid subnet mask'
67 = 'An error occurred while processing an Instance that was returned'
68 = 'Invalid input parameter'
69 = 'More than 5 gateways specified'
70 = 'Invalid IP address'
71 = 'Invalid gateway IP address'
72 = 'An error occurred while accessing the Registry for the…'
73 = 'Invalid domain name'
74 = 'Invalid host name'
75 = 'No primary/secondary WINS server defined'
76 = 'Invalid file'
77 = 'Invalid system path'
78 = 'File copy failed'
79 = 'Invalid security parameter'
80 = 'Unable to configure TCP/IP service'
81 = 'Unable to configure DHCP service'
82 = 'Unable to renew DHCP lease'
83 = 'Unable to release DHCP lease'
84 = 'IP not enabled on adapter'
85 = 'IPX not enabled on adapter'
86 = 'Frame/network number bounds error'
87 = 'Invalid frame type'
88 = 'Invalid network number'
89 = 'Duplicate network number'
90 = 'Parameter out of bounds'
91 = 'Access denied'
92 = 'Out of memory'
93 = 'Already exists'
94 = 'Path, file or object not found'
95 = 'Unable to notify service'
96 = 'Unable to notify DNS service'
97 = 'Interface not configurable'
98 = 'Not all DHCP leases could be released/renewed'
100 = 'DHCP not enabled on adapter'
}
$returnValueName[[int]$result.ReturnValue]
}This method can change the system. The -WhatIf parameter shows the operation without running it: remove it only after checking.
SetIPConnectionMetric #
Sets the routing metric associated with this IP-bound adapter.
uint32 SetIPConnectionMetric([in] uint32 IPConnectionMetric);Parameters
| Parameter | Type | Direction | Description |
|---|---|---|---|
| IPConnectionMetric | uint32 | in | Indicates the cost of using the configured routes for this IP-bound adapter. The value is weighted for those routes in the IP routing table. If there are multiple routes to a destination in the routing table, the route with the lowest metric is used. The range of valid values is 1 through 9999. The default value is 1. |
Return values
| Value | Label | Description |
|---|---|---|
| 0 | Successful completion, no reboot required | |
| 1 | Successful completion, reboot required | |
| 64 | Method not supported on this platform | |
| 65 | Unknown failure | |
| 66 | Invalid subnet mask | |
| 67 | An error occurred while processing an Instance that was returned | |
| 68 | Invalid input parameter | |
| 69 | More than 5 gateways specified | More than five gateways specified. |
| 70 | Invalid IP address | |
| 71 | Invalid gateway IP address | |
| 72 | An error occurred while accessing the Registry for the requested information | |
| 73 | Invalid domain name | |
| 74 | Invalid host name | |
| 75 | No primary/secondary WINS server defined | No primary or secondary WINS server defined. |
| 76 | Invalid file | |
| 77 | Invalid system path | |
| 78 | File copy failed | |
| 79 | Invalid security parameter | |
| 80 | Unable to configure TCP/IP service | |
| 81 | Unable to configure DHCP service | |
| 82 | Unable to renew DHCP lease | |
| 83 | Unable to release DHCP lease | |
| 84 | IP not enabled on adapter | |
| 85 | IPX not enabled on adapter | |
| 86 | Frame/network number bounds error | Frame or network number bounds error. |
| 87 | Invalid frame type | |
| 88 | Invalid network number | |
| 89 | Duplicate network number | |
| 90 | Parameter out of bounds | |
| 91 | Access denied | |
| 92 | Out of memory | |
| 93 | Already exists | |
| 94 | Path, file or object not found | Path, file, or object not found. |
| 95 | Unable to notify service | |
| 96 | Unable to notify DNS service | |
| 97 | Interface not configurable | |
| 98 | Not all DHCP leases could be released/renewed | Not all DHCP leases could be released or renewed. |
| 100 | DHCP not enabled on adapter | |
| 101..4294967295 | Other |
Call the SetIPConnectionMetric method
review before running# Warning: this method can change the system. -WhatIf shows the operation without running it.
# Target instance
$instance = Get-CimInstance -ClassName Win32_NetworkAdapterConfiguration -Filter 'IPEnabled = TRUE'
$methodParameters = @{
InputObject = $instance
MethodName = 'SetIPConnectionMetric'
Arguments = @{ IPConnectionMetric = 0 }
WhatIf = $true # Remove this line to actually run the method
}
$result = Invoke-CimMethod @methodParameters
# With -WhatIf nothing runs and no result is returned
if ($result) {
$returnValueName = @{
0 = 'Successful completion, no reboot required'
1 = 'Successful completion, reboot required'
64 = 'Method not supported on this platform'
65 = 'Unknown failure'
66 = 'Invalid subnet mask'
67 = 'An error occurred while processing an Instance that was returned'
68 = 'Invalid input parameter'
69 = 'More than 5 gateways specified'
70 = 'Invalid IP address'
71 = 'Invalid gateway IP address'
72 = 'An error occurred while accessing the Registry for the…'
73 = 'Invalid domain name'
74 = 'Invalid host name'
75 = 'No primary/secondary WINS server defined'
76 = 'Invalid file'
77 = 'Invalid system path'
78 = 'File copy failed'
79 = 'Invalid security parameter'
80 = 'Unable to configure TCP/IP service'
81 = 'Unable to configure DHCP service'
82 = 'Unable to renew DHCP lease'
83 = 'Unable to release DHCP lease'
84 = 'IP not enabled on adapter'
85 = 'IPX not enabled on adapter'
86 = 'Frame/network number bounds error'
87 = 'Invalid frame type'
88 = 'Invalid network number'
89 = 'Duplicate network number'
90 = 'Parameter out of bounds'
91 = 'Access denied'
92 = 'Out of memory'
93 = 'Already exists'
94 = 'Path, file or object not found'
95 = 'Unable to notify service'
96 = 'Unable to notify DNS service'
97 = 'Interface not configurable'
98 = 'Not all DHCP leases could be released/renewed'
100 = 'DHCP not enabled on adapter'
}
$returnValueName[[int]$result.ReturnValue]
}This method can change the system. The -WhatIf parameter shows the operation without running it: remove it only after checking.
SetIPUseZeroBroadcast static#
Sets IP zero broadcast usage.
uint32 SetIPUseZeroBroadcast([in] boolean IPUseZeroBroadcast);Parameters
| Parameter | Type | Direction | Description |
|---|---|---|---|
| IPUseZeroBroadcast | boolean | in | If true, IP zero broadcast is used. The default is false. |
Return values
| Value | Label | Description |
|---|---|---|
| 0 | Successful completion, no reboot required | |
| 1 | Successful completion, reboot required | |
| 64 | Method not supported on this platform | |
| 65 | Unknown failure | |
| 66 | Invalid subnet mask | |
| 67 | An error occurred while processing an Instance that was returned | |
| 68 | Invalid input parameter | |
| 69 | More than 5 gateways specified | More than five gateways specified. |
| 70 | Invalid IP address | |
| 71 | Invalid gateway IP address | |
| 72 | An error occurred while accessing the Registry for the requested information | |
| 73 | Invalid domain name | |
| 74 | Invalid host name | |
| 75 | No primary/secondary WINS server defined | No primary or secondary WINS server defined. |
| 76 | Invalid file | |
| 77 | Invalid system path | |
| 78 | File copy failed | |
| 79 | Invalid security parameter | |
| 80 | Unable to configure TCP/IP service | |
| 81 | Unable to configure DHCP service | |
| 82 | Unable to renew DHCP lease | |
| 83 | Unable to release DHCP lease | |
| 84 | IP not enabled on adapter | |
| 85 | IPX not enabled on adapter | |
| 86 | Frame/network number bounds error | Frame or network number bounds error. |
| 87 | Invalid frame type | |
| 88 | Invalid network number | |
| 89 | Duplicate network number | |
| 90 | Parameter out of bounds | |
| 91 | Access denied | |
| 92 | Out of memory | |
| 93 | Already exists | |
| 94 | Path, file or object not found | Path, file, or object not found. |
| 95 | Unable to notify service | |
| 96 | Unable to notify DNS service | |
| 97 | Interface not configurable | |
| 98 | Not all DHCP leases could be released/renewed | Not all DHCP leases could be released or renewed. |
| 100 | DHCP not enabled on adapter | |
| 101..4294967295 | Other |
Call the SetIPUseZeroBroadcast method
review before running# Warning: this method can change the system. -WhatIf shows the operation without running it.
$methodParameters = @{
ClassName = 'Win32_NetworkAdapterConfiguration'
MethodName = 'SetIPUseZeroBroadcast'
Arguments = @{ IPUseZeroBroadcast = $false }
WhatIf = $true # Remove this line to actually run the method
}
$result = Invoke-CimMethod @methodParameters
# With -WhatIf nothing runs and no result is returned
if ($result) {
$returnValueName = @{
0 = 'Successful completion, no reboot required'
1 = 'Successful completion, reboot required'
64 = 'Method not supported on this platform'
65 = 'Unknown failure'
66 = 'Invalid subnet mask'
67 = 'An error occurred while processing an Instance that was returned'
68 = 'Invalid input parameter'
69 = 'More than 5 gateways specified'
70 = 'Invalid IP address'
71 = 'Invalid gateway IP address'
72 = 'An error occurred while accessing the Registry for the…'
73 = 'Invalid domain name'
74 = 'Invalid host name'
75 = 'No primary/secondary WINS server defined'
76 = 'Invalid file'
77 = 'Invalid system path'
78 = 'File copy failed'
79 = 'Invalid security parameter'
80 = 'Unable to configure TCP/IP service'
81 = 'Unable to configure DHCP service'
82 = 'Unable to renew DHCP lease'
83 = 'Unable to release DHCP lease'
84 = 'IP not enabled on adapter'
85 = 'IPX not enabled on adapter'
86 = 'Frame/network number bounds error'
87 = 'Invalid frame type'
88 = 'Invalid network number'
89 = 'Duplicate network number'
90 = 'Parameter out of bounds'
91 = 'Access denied'
92 = 'Out of memory'
93 = 'Already exists'
94 = 'Path, file or object not found'
95 = 'Unable to notify service'
96 = 'Unable to notify DNS service'
97 = 'Interface not configurable'
98 = 'Not all DHCP leases could be released/renewed'
100 = 'DHCP not enabled on adapter'
}
$returnValueName[[int]$result.ReturnValue]
}This method can change the system. The -WhatIf parameter shows the operation without running it: remove it only after checking.
SetIPXFrameTypeNetworkPairs #
Sets Internetworking Packet Exchange (IPX) network number/frame pairs for this network adapter.
uint32 SetIPXFrameTypeNetworkPairs([in] string[] IPXNetworkNumber, [in] uint32[] IPXFrameType);Parameters
| Parameter | Type | Direction | Description |
|---|---|---|---|
| IPXNetworkNumber | string[] | in | An array of characters that uniquely identify an adapter on the computer system. The NetWare Link (NWLink) IPX/SPX-compatible transport in Windows 2000 and Windows NT 3.51 or higher, uses two different types of network numbers. This number is sometimes referred to as the External Network Number. It must be unique for each network segment. The values in this string list must have a corresponding value in the IPXFrameType parameter identifying the packet frame type used for this network. |
| IPXFrameType | uint32[] | in | An integer array of frame type identifiers. The values in this array correspond to the elements in the *IPXNetworkNumber* parameter. |
Return values
| Value | Label | Description |
|---|---|---|
| 0 | Successful completion, no reboot required | |
| 1 | Successful completion, reboot required | |
| 64 | Method not supported on this platform | |
| 65 | Unknown failure | |
| 66 | Invalid subnet mask | |
| 67 | An error occurred while processing an Instance that was returned | |
| 68 | Invalid input parameter | |
| 69 | More than 5 gateways specified | |
| 70 | Invalid IP address | |
| 71 | Invalid gateway IP address | |
| 72 | An error occurred while accessing the Registry for the requested information | |
| 73 | Invalid domain name | |
| 74 | Invalid host name | |
| 75 | No primary/secondary WINS server defined | |
| 76 | Invalid file | |
| 77 | Invalid system path | |
| 78 | File copy failed | |
| 79 | Invalid security parameter | |
| 80 | Unable to configure TCP/IP service | |
| 81 | Unable to configure DHCP service | |
| 82 | Unable to renew DHCP lease | |
| 83 | Unable to release DHCP lease | |
| 84 | IP not enabled on adapter | |
| 85 | IPX not enabled on adapter | |
| 86 | Frame/network number bounds error | |
| 87 | Invalid frame type | |
| 88 | Invalid network number | |
| 89 | Duplicate network number | |
| 90 | Parameter out of bounds | |
| 91 | Access denied | |
| 92 | Out of memory | |
| 93 | Already exists | |
| 94 | Path, file or object not found | |
| 95 | Unable to notify service | |
| 96 | Unable to notify DNS service | |
| 97 | Interface not configurable | |
| 98 | Not all DHCP leases could be released/renewed | |
| 100 | DHCP not enabled on adapter | |
| 101–4294967295 | Other |
Call the SetIPXFrameTypeNetworkPairs method
review before running# Warning: this method can change the system. -WhatIf shows the operation without running it.
# Target instance
$instance = Get-CimInstance -ClassName Win32_NetworkAdapterConfiguration -Filter 'IPEnabled = TRUE'
$methodParameters = @{
InputObject = $instance
MethodName = 'SetIPXFrameTypeNetworkPairs'
Arguments = @{
IPXNetworkNumber = @('Example')
IPXFrameType = @(1)
}
WhatIf = $true # Remove this line to actually run the method
}
$result = Invoke-CimMethod @methodParameters
# With -WhatIf nothing runs and no result is returned
if ($result) {
$returnValueName = @{
0 = 'Successful completion, no reboot required'
1 = 'Successful completion, reboot required'
64 = 'Method not supported on this platform'
65 = 'Unknown failure'
66 = 'Invalid subnet mask'
67 = 'An error occurred while processing an Instance that was returned'
68 = 'Invalid input parameter'
69 = 'More than 5 gateways specified'
70 = 'Invalid IP address'
71 = 'Invalid gateway IP address'
72 = 'An error occurred while accessing the Registry for the…'
73 = 'Invalid domain name'
74 = 'Invalid host name'
75 = 'No primary/secondary WINS server defined'
76 = 'Invalid file'
77 = 'Invalid system path'
78 = 'File copy failed'
79 = 'Invalid security parameter'
80 = 'Unable to configure TCP/IP service'
81 = 'Unable to configure DHCP service'
82 = 'Unable to renew DHCP lease'
83 = 'Unable to release DHCP lease'
84 = 'IP not enabled on adapter'
85 = 'IPX not enabled on adapter'
86 = 'Frame/network number bounds error'
87 = 'Invalid frame type'
88 = 'Invalid network number'
89 = 'Duplicate network number'
90 = 'Parameter out of bounds'
91 = 'Access denied'
92 = 'Out of memory'
93 = 'Already exists'
94 = 'Path, file or object not found'
95 = 'Unable to notify service'
96 = 'Unable to notify DNS service'
97 = 'Interface not configurable'
98 = 'Not all DHCP leases could be released/renewed'
100 = 'DHCP not enabled on adapter'
}
$returnValueName[[int]$result.ReturnValue]
}This method can change the system. The -WhatIf parameter shows the operation without running it: remove it only after checking.
SetIPXVirtualNetworkNumber #
Sets the Internetworking Packet Exchange (IPX) virtual network number on the target computer system.
uint32 SetIPXVirtualNetworkNumber([in] string IPXVirtualNetNumber);Parameters
| Parameter | Type | Direction | Description |
|---|---|---|---|
| IPXVirtualNetNumber | string | in | The virtual network number for this system. |
Return values
| Value | Label | Description |
|---|---|---|
| 0 | Successful completion, no reboot required | |
| 1 | Successful completion, reboot required | |
| 64 | Method not supported on this platform | |
| 65 | Unknown failure | |
| 66 | Invalid subnet mask | |
| 67 | An error occurred while processing an Instance that was returned | |
| 68 | Invalid input parameter | |
| 69 | More than 5 gateways specified | |
| 70 | Invalid IP address | |
| 71 | Invalid gateway IP address | |
| 72 | An error occurred while accessing the Registry for the requested information | |
| 73 | Invalid domain name | |
| 74 | Invalid host name | |
| 75 | No primary/secondary WINS server defined | |
| 76 | Invalid file | |
| 77 | Invalid system path | |
| 78 | File copy failed | |
| 79 | Invalid security parameter | |
| 80 | Unable to configure TCP/IP service | |
| 81 | Unable to configure DHCP service | |
| 82 | Unable to renew DHCP lease | |
| 83 | Unable to release DHCP lease | |
| 84 | IP not enabled on adapter | |
| 85 | IPX not enabled on adapter | |
| 86 | Frame/network number bounds error | |
| 87 | Invalid frame type | |
| 88 | Invalid network number | |
| 89 | Duplicate network number | |
| 90 | Parameter out of bounds | |
| 91 | Access denied | |
| 92 | Out of memory | |
| 93 | Already exists | |
| 94 | Path, file or object not found | |
| 95 | Unable to notify service | |
| 96 | Unable to notify DNS service | |
| 97 | Interface not configurable | |
| 98 | Not all DHCP leases could be released/renewed | |
| 100 | DHCP not enabled on adapter | |
| 101–4294967295 | Other |
Call the SetIPXVirtualNetworkNumber method
review before running# Warning: this method can change the system. -WhatIf shows the operation without running it.
# Target instance
$instance = Get-CimInstance -ClassName Win32_NetworkAdapterConfiguration -Filter 'IPEnabled = TRUE'
$methodParameters = @{
InputObject = $instance
MethodName = 'SetIPXVirtualNetworkNumber'
Arguments = @{ IPXVirtualNetNumber = 'Example' }
WhatIf = $true # Remove this line to actually run the method
}
$result = Invoke-CimMethod @methodParameters
# With -WhatIf nothing runs and no result is returned
if ($result) {
$returnValueName = @{
0 = 'Successful completion, no reboot required'
1 = 'Successful completion, reboot required'
64 = 'Method not supported on this platform'
65 = 'Unknown failure'
66 = 'Invalid subnet mask'
67 = 'An error occurred while processing an Instance that was returned'
68 = 'Invalid input parameter'
69 = 'More than 5 gateways specified'
70 = 'Invalid IP address'
71 = 'Invalid gateway IP address'
72 = 'An error occurred while accessing the Registry for the…'
73 = 'Invalid domain name'
74 = 'Invalid host name'
75 = 'No primary/secondary WINS server defined'
76 = 'Invalid file'
77 = 'Invalid system path'
78 = 'File copy failed'
79 = 'Invalid security parameter'
80 = 'Unable to configure TCP/IP service'
81 = 'Unable to configure DHCP service'
82 = 'Unable to renew DHCP lease'
83 = 'Unable to release DHCP lease'
84 = 'IP not enabled on adapter'
85 = 'IPX not enabled on adapter'
86 = 'Frame/network number bounds error'
87 = 'Invalid frame type'
88 = 'Invalid network number'
89 = 'Duplicate network number'
90 = 'Parameter out of bounds'
91 = 'Access denied'
92 = 'Out of memory'
93 = 'Already exists'
94 = 'Path, file or object not found'
95 = 'Unable to notify service'
96 = 'Unable to notify DNS service'
97 = 'Interface not configurable'
98 = 'Not all DHCP leases could be released/renewed'
100 = 'DHCP not enabled on adapter'
}
$returnValueName[[int]$result.ReturnValue]
}This method can change the system. The -WhatIf parameter shows the operation without running it: remove it only after checking.
SetKeepAliveInterval static#
Sets the interval separating Keep Alive Retransmissions until a response is received.
uint32 SetKeepAliveInterval([in] uint32 KeepAliveInterval);Parameters
| Parameter | Type | Direction | Description |
|---|---|---|---|
| KeepAliveInterval | uint32 | in | Value, in milliseconds, for the interval separating Keep Alive Retransmissions until a response is received. |
Return values
| Value | Label | Description |
|---|---|---|
| 0 | Successful completion, no reboot required | |
| 1 | Successful completion, reboot required | |
| 64 | Method not supported on this platform | |
| 65 | Unknown failure | |
| 66 | Invalid subnet mask | |
| 67 | An error occurred while processing an Instance that was returned | |
| 68 | Invalid input parameter | |
| 69 | More than 5 gateways specified | More than five gateways specified. |
| 70 | Invalid IP address | |
| 71 | Invalid gateway IP address | |
| 72 | An error occurred while accessing the Registry for the requested information | |
| 73 | Invalid domain name | |
| 74 | Invalid host name | |
| 75 | No primary/secondary WINS server defined | No primary or secondary WINS server defined. |
| 76 | Invalid file | |
| 77 | Invalid system path | |
| 78 | File copy failed | |
| 79 | Invalid security parameter | |
| 80 | Unable to configure TCP/IP service | |
| 81 | Unable to configure DHCP service | |
| 82 | Unable to renew DHCP lease | |
| 83 | Unable to release DHCP lease | |
| 84 | IP not enabled on adapter | |
| 85 | IPX not enabled on adapter | |
| 86 | Frame/network number bounds error | Frame or network number bounds error. |
| 87 | Invalid frame type | |
| 88 | Invalid network number | |
| 89 | Duplicate network number | |
| 90 | Parameter out of bounds | |
| 91 | Access denied | |
| 92 | Out of memory | |
| 93 | Already exists | |
| 94 | Path, file or object not found | Path, file, or object not found. |
| 95 | Unable to notify service | |
| 96 | Unable to notify DNS service | |
| 97 | Interface not configurable | |
| 98 | Not all DHCP leases could be released/renewed | Not all DHCP leases could be released or renewed. |
| 100 | DHCP not enabled on adapter | |
| 101..4294967295 | Other |
Call the SetKeepAliveInterval method
review before running# Warning: this method can change the system. -WhatIf shows the operation without running it.
$methodParameters = @{
ClassName = 'Win32_NetworkAdapterConfiguration'
MethodName = 'SetKeepAliveInterval'
Arguments = @{ KeepAliveInterval = 0 }
WhatIf = $true # Remove this line to actually run the method
}
$result = Invoke-CimMethod @methodParameters
# With -WhatIf nothing runs and no result is returned
if ($result) {
$returnValueName = @{
0 = 'Successful completion, no reboot required'
1 = 'Successful completion, reboot required'
64 = 'Method not supported on this platform'
65 = 'Unknown failure'
66 = 'Invalid subnet mask'
67 = 'An error occurred while processing an Instance that was returned'
68 = 'Invalid input parameter'
69 = 'More than 5 gateways specified'
70 = 'Invalid IP address'
71 = 'Invalid gateway IP address'
72 = 'An error occurred while accessing the Registry for the…'
73 = 'Invalid domain name'
74 = 'Invalid host name'
75 = 'No primary/secondary WINS server defined'
76 = 'Invalid file'
77 = 'Invalid system path'
78 = 'File copy failed'
79 = 'Invalid security parameter'
80 = 'Unable to configure TCP/IP service'
81 = 'Unable to configure DHCP service'
82 = 'Unable to renew DHCP lease'
83 = 'Unable to release DHCP lease'
84 = 'IP not enabled on adapter'
85 = 'IPX not enabled on adapter'
86 = 'Frame/network number bounds error'
87 = 'Invalid frame type'
88 = 'Invalid network number'
89 = 'Duplicate network number'
90 = 'Parameter out of bounds'
91 = 'Access denied'
92 = 'Out of memory'
93 = 'Already exists'
94 = 'Path, file or object not found'
95 = 'Unable to notify service'
96 = 'Unable to notify DNS service'
97 = 'Interface not configurable'
98 = 'Not all DHCP leases could be released/renewed'
100 = 'DHCP not enabled on adapter'
}
$returnValueName[[int]$result.ReturnValue]
}This method can change the system. The -WhatIf parameter shows the operation without running it: remove it only after checking.
SetKeepAliveTime static#
Sets how often TCP attempts to verify that an idle connection is still available by sending a Keep Alive packet.
uint32 SetKeepAliveTime([in] uint32 KeepAliveTime);Parameters
| Parameter | Type | Direction | Description |
|---|---|---|---|
| KeepAliveTime | uint32 | in | Interval, in milliseconds, the TCP waits to check that an idle connection is still available. |
Return values
| Value | Label | Description |
|---|---|---|
| 0 | Successful completion, no reboot required | |
| 1 | Successful completion, reboot required | |
| 64 | Method not supported on this platform | |
| 65 | Unknown failure | |
| 66 | Invalid subnet mask | |
| 67 | An error occurred while processing an Instance that was returned | |
| 68 | Invalid input parameter | |
| 69 | More than 5 gateways specified | More than five gateways specified. |
| 70 | Invalid IP address | |
| 71 | Invalid gateway IP address | |
| 72 | An error occurred while accessing the Registry for the requested information | |
| 73 | Invalid domain name | |
| 74 | Invalid host name | |
| 75 | No primary/secondary WINS server defined | No primary or secondary WINS server defined. |
| 76 | Invalid file | |
| 77 | Invalid system path | |
| 78 | File copy failed | |
| 79 | Invalid security parameter | |
| 80 | Unable to configure TCP/IP service | |
| 81 | Unable to configure DHCP service | |
| 82 | Unable to renew DHCP lease | |
| 83 | Unable to release DHCP lease | |
| 84 | IP not enabled on adapter | |
| 85 | IPX not enabled on adapter | |
| 86 | Frame/network number bounds error | Frame or network number bounds error. |
| 87 | Invalid frame type | |
| 88 | Invalid network number | |
| 89 | Duplicate network number | |
| 90 | Parameter out of bounds | |
| 91 | Access denied | |
| 92 | Out of memory | |
| 93 | Already exists | |
| 94 | Path, file or object not found | Path, file, or object not found. |
| 95 | Unable to notify service | |
| 96 | Unable to notify DNS service | |
| 97 | Interface not configurable | |
| 98 | Not all DHCP leases could be released/renewed | Not all DHCP leases could be released or renewed. |
| 100 | DHCP not enabled on adapter | |
| 101..4294967295 | Other |
Call the SetKeepAliveTime method
review before running# Warning: this method can change the system. -WhatIf shows the operation without running it.
$methodParameters = @{
ClassName = 'Win32_NetworkAdapterConfiguration'
MethodName = 'SetKeepAliveTime'
Arguments = @{ KeepAliveTime = 0 }
WhatIf = $true # Remove this line to actually run the method
}
$result = Invoke-CimMethod @methodParameters
# With -WhatIf nothing runs and no result is returned
if ($result) {
$returnValueName = @{
0 = 'Successful completion, no reboot required'
1 = 'Successful completion, reboot required'
64 = 'Method not supported on this platform'
65 = 'Unknown failure'
66 = 'Invalid subnet mask'
67 = 'An error occurred while processing an Instance that was returned'
68 = 'Invalid input parameter'
69 = 'More than 5 gateways specified'
70 = 'Invalid IP address'
71 = 'Invalid gateway IP address'
72 = 'An error occurred while accessing the Registry for the…'
73 = 'Invalid domain name'
74 = 'Invalid host name'
75 = 'No primary/secondary WINS server defined'
76 = 'Invalid file'
77 = 'Invalid system path'
78 = 'File copy failed'
79 = 'Invalid security parameter'
80 = 'Unable to configure TCP/IP service'
81 = 'Unable to configure DHCP service'
82 = 'Unable to renew DHCP lease'
83 = 'Unable to release DHCP lease'
84 = 'IP not enabled on adapter'
85 = 'IPX not enabled on adapter'
86 = 'Frame/network number bounds error'
87 = 'Invalid frame type'
88 = 'Invalid network number'
89 = 'Duplicate network number'
90 = 'Parameter out of bounds'
91 = 'Access denied'
92 = 'Out of memory'
93 = 'Already exists'
94 = 'Path, file or object not found'
95 = 'Unable to notify service'
96 = 'Unable to notify DNS service'
97 = 'Interface not configurable'
98 = 'Not all DHCP leases could be released/renewed'
100 = 'DHCP not enabled on adapter'
}
$returnValueName[[int]$result.ReturnValue]
}This method can change the system. The -WhatIf parameter shows the operation without running it: remove it only after checking.
SetMTU static#
Sets the default Maximum Transmission Unit (MTU) for a network interface. This method is not supported.
uint32 SetMTU([in] uint32 MTU);Parameters
| Parameter | Type | Direction | Description |
|---|---|---|---|
| MTU | uint32 | in | Default Maximum Transmission Unit (MTU) for a network interface. The range of this value spans the minimum packet size (68) to the MTU supported by the underlying network. |
Return values
| Value | Label | Description |
|---|---|---|
| 0 | Successful completion, no reboot required | Successful completion. No reboot is required. |
| 1 | Successful completion, reboot required | Successful completion. Reboot is required. |
| 64 | Method not supported on this platform | |
| 65 | Unknown failure | |
| 66 | Invalid subnet mask | |
| 67 | An error occurred while processing an Instance that was returned | |
| 68 | Invalid input parameter | |
| 69 | More than 5 gateways specified | More than five gateways specified. |
| 70 | Invalid IP address | |
| 71 | Invalid gateway IP address | |
| 72 | An error occurred while accessing the Registry for the requested information | |
| 73 | Invalid domain name | |
| 74 | Invalid host name | |
| 75 | No primary/secondary WINS server defined | No primary or secondary WINS server defined. |
| 76 | Invalid file | |
| 77 | Invalid system path | |
| 78 | File copy failed | |
| 79 | Invalid security parameter | |
| 80 | Unable to configure TCP/IP service | |
| 81 | Unable to configure DHCP service | |
| 82 | Unable to renew DHCP lease | |
| 83 | Unable to release DHCP lease | |
| 84 | IP not enabled on adapter | |
| 85 | IPX not enabled on adapter | |
| 86 | Frame/network number bounds error | Frame or network number bounds error. |
| 87 | Invalid frame type | |
| 88 | Invalid network number | |
| 89 | Duplicate network number | |
| 90 | Parameter out of bounds | |
| 91 | Access denied | |
| 92 | Out of memory | |
| 93 | Already exists | |
| 94 | Path, file or object not found | Path, file, or object not found. |
| 95 | Unable to notify service | |
| 96 | Unable to notify DNS service | |
| 97 | Interface not configurable | |
| 98 | Not all DHCP leases could be released/renewed | Not all DHCP leases can be released or renewed. |
| 100 | DHCP not enabled on adapter | DHCP is not enabled on adapter. |
| 101..4294967295 | Other |
Call the SetMTU method
review before running# Warning: this method can change the system. -WhatIf shows the operation without running it.
$methodParameters = @{
ClassName = 'Win32_NetworkAdapterConfiguration'
MethodName = 'SetMTU'
Arguments = @{ MTU = 0 }
WhatIf = $true # Remove this line to actually run the method
}
$result = Invoke-CimMethod @methodParameters
# With -WhatIf nothing runs and no result is returned
if ($result) {
$returnValueName = @{
0 = 'Successful completion, no reboot required'
1 = 'Successful completion, reboot required'
64 = 'Method not supported on this platform'
65 = 'Unknown failure'
66 = 'Invalid subnet mask'
67 = 'An error occurred while processing an Instance that was returned'
68 = 'Invalid input parameter'
69 = 'More than 5 gateways specified'
70 = 'Invalid IP address'
71 = 'Invalid gateway IP address'
72 = 'An error occurred while accessing the Registry for the…'
73 = 'Invalid domain name'
74 = 'Invalid host name'
75 = 'No primary/secondary WINS server defined'
76 = 'Invalid file'
77 = 'Invalid system path'
78 = 'File copy failed'
79 = 'Invalid security parameter'
80 = 'Unable to configure TCP/IP service'
81 = 'Unable to configure DHCP service'
82 = 'Unable to renew DHCP lease'
83 = 'Unable to release DHCP lease'
84 = 'IP not enabled on adapter'
85 = 'IPX not enabled on adapter'
86 = 'Frame/network number bounds error'
87 = 'Invalid frame type'
88 = 'Invalid network number'
89 = 'Duplicate network number'
90 = 'Parameter out of bounds'
91 = 'Access denied'
92 = 'Out of memory'
93 = 'Already exists'
94 = 'Path, file or object not found'
95 = 'Unable to notify service'
96 = 'Unable to notify DNS service'
97 = 'Interface not configurable'
98 = 'Not all DHCP leases could be released/renewed'
100 = 'DHCP not enabled on adapter'
}
$returnValueName[[int]$result.ReturnValue]
}This method can change the system. The -WhatIf parameter shows the operation without running it: remove it only after checking.
SetNumForwardPackets static#
Sets the number of IP packet headers allocated for the router packet queue.
uint32 SetNumForwardPackets([in] uint32 NumForwardPackets);Parameters
| Parameter | Type | Direction | Description |
|---|---|---|---|
| NumForwardPackets | uint32 | in | Number of IP packet headers allocated for the router packet queue. This should be at least as large as the value of the ForwardBufferMemory property divided by the maximum IP data size of the networks connected to the router. It should be no larger than the ForwardBufferMemory value divided by 256, since at least 256 bytes of forward buffer memory are required by each packet. The optimal number of forward packets for a given ForwardBufferMemory size depends on the type of traffic carried on the network, and will be somewhere between these two values. If the router is disabled, this parameter is ignored and no headers are allocated. Valid range: 1 - 0xFFFFFFFE. |
Return values
| Value | Label | Description |
|---|---|---|
| 0 | Successful completion, no reboot required | |
| 1 | Successful completion, reboot required | |
| 64 | Method not supported on this platform | |
| 65 | Unknown failure | |
| 66 | Invalid subnet mask | |
| 67 | An error occurred while processing an Instance that was returned | |
| 68 | Invalid input parameter | |
| 69 | More than 5 gateways specified | More than five gateways specified. |
| 70 | Invalid IP address | |
| 71 | Invalid gateway IP address | |
| 72 | An error occurred while accessing the Registry for the requested information | |
| 73 | Invalid domain name | |
| 74 | Invalid host name | |
| 75 | No primary/secondary WINS server defined | No primary or secondary WINS server defined. |
| 76 | Invalid file | |
| 77 | Invalid system path | |
| 78 | File copy failed | |
| 79 | Invalid security parameter | |
| 80 | Unable to configure TCP/IP service | |
| 81 | Unable to configure DHCP service | |
| 82 | Unable to renew DHCP lease | |
| 83 | Unable to release DHCP lease | |
| 84 | IP not enabled on adapter | |
| 85 | IPX not enabled on adapter | |
| 86 | Frame/network number bounds error | Frame or network number bounds error. |
| 87 | Invalid frame type | |
| 88 | Invalid network number | |
| 89 | Duplicate network number | |
| 90 | Parameter out of bounds | |
| 91 | Access denied | |
| 92 | Out of memory | |
| 93 | Already exists | |
| 94 | Path, file or object not found | Path, file, or object not found. |
| 95 | Unable to notify service | |
| 96 | Unable to notify DNS service | |
| 97 | Interface not configurable | |
| 98 | Not all DHCP leases could be released/renewed | Not all DHCP leases could be released or renewed. |
| 100 | DHCP not enabled on adapter | |
| 101..4294967295 | Other |
Call the SetNumForwardPackets method
review before running# Warning: this method can change the system. -WhatIf shows the operation without running it.
$methodParameters = @{
ClassName = 'Win32_NetworkAdapterConfiguration'
MethodName = 'SetNumForwardPackets'
Arguments = @{ NumForwardPackets = 0 }
WhatIf = $true # Remove this line to actually run the method
}
$result = Invoke-CimMethod @methodParameters
# With -WhatIf nothing runs and no result is returned
if ($result) {
$returnValueName = @{
0 = 'Successful completion, no reboot required'
1 = 'Successful completion, reboot required'
64 = 'Method not supported on this platform'
65 = 'Unknown failure'
66 = 'Invalid subnet mask'
67 = 'An error occurred while processing an Instance that was returned'
68 = 'Invalid input parameter'
69 = 'More than 5 gateways specified'
70 = 'Invalid IP address'
71 = 'Invalid gateway IP address'
72 = 'An error occurred while accessing the Registry for the…'
73 = 'Invalid domain name'
74 = 'Invalid host name'
75 = 'No primary/secondary WINS server defined'
76 = 'Invalid file'
77 = 'Invalid system path'
78 = 'File copy failed'
79 = 'Invalid security parameter'
80 = 'Unable to configure TCP/IP service'
81 = 'Unable to configure DHCP service'
82 = 'Unable to renew DHCP lease'
83 = 'Unable to release DHCP lease'
84 = 'IP not enabled on adapter'
85 = 'IPX not enabled on adapter'
86 = 'Frame/network number bounds error'
87 = 'Invalid frame type'
88 = 'Invalid network number'
89 = 'Duplicate network number'
90 = 'Parameter out of bounds'
91 = 'Access denied'
92 = 'Out of memory'
93 = 'Already exists'
94 = 'Path, file or object not found'
95 = 'Unable to notify service'
96 = 'Unable to notify DNS service'
97 = 'Interface not configurable'
98 = 'Not all DHCP leases could be released/renewed'
100 = 'DHCP not enabled on adapter'
}
$returnValueName[[int]$result.ReturnValue]
}This method can change the system. The -WhatIf parameter shows the operation without running it: remove it only after checking.
SetPMTUBHDetect static#
Enables detection of Black Hole routers.
uint32 SetPMTUBHDetect([in] boolean PMTUBHDetectEnabled);Parameters
| Parameter | Type | Direction | Description |
|---|---|---|---|
| PMTUBHDetectEnabled | boolean | in | If true, TCP attempts to discover Black Hole and route packets in different network paths. |
Return values
| Value | Label | Description |
|---|---|---|
| 0 | Successful completion, no reboot required | |
| 1 | Successful completion, reboot required | |
| 64 | Method not supported on this platform | |
| 65 | Unknown failure | |
| 66 | Invalid subnet mask | |
| 67 | An error occurred while processing an Instance that was returned | |
| 68 | Invalid input parameter | |
| 69 | More than 5 gateways specified | More than five gateways specified. |
| 70 | Invalid IP address | |
| 71 | Invalid gateway IP address | |
| 72 | An error occurred while accessing the Registry for the requested information | |
| 73 | Invalid domain name | |
| 74 | Invalid host name | |
| 75 | No primary/secondary WINS server defined | No primary or secondary WINS server defined. |
| 76 | Invalid file | |
| 77 | Invalid system path | |
| 78 | File copy failed | |
| 79 | Invalid security parameter | |
| 80 | Unable to configure TCP/IP service | |
| 81 | Unable to configure DHCP service | |
| 82 | Unable to renew DHCP lease | |
| 83 | Unable to release DHCP lease | |
| 84 | IP not enabled on adapter | |
| 85 | IPX not enabled on adapter | |
| 86 | Frame/network number bounds error | Frame or network number bounds error. |
| 87 | Invalid frame type | |
| 88 | Invalid network number | |
| 89 | Duplicate network number | |
| 90 | Parameter out of bounds | |
| 91 | Access denied | |
| 92 | Out of memory | |
| 93 | Already exists | |
| 94 | Path, file or object not found | Path, file, or object not found. |
| 95 | Unable to notify service | |
| 96 | Unable to notify DNS service | |
| 97 | Interface not configurable | |
| 98 | Not all DHCP leases could be released/renewed | Not all DHCP leases could be released or renewed. |
| 100 | DHCP not enabled on adapter | |
| 101..4294967295 | Other |
Call the SetPMTUBHDetect method
review before running# Warning: this method can change the system. -WhatIf shows the operation without running it.
$methodParameters = @{
ClassName = 'Win32_NetworkAdapterConfiguration'
MethodName = 'SetPMTUBHDetect'
Arguments = @{ PMTUBHDetectEnabled = $false }
WhatIf = $true # Remove this line to actually run the method
}
$result = Invoke-CimMethod @methodParameters
# With -WhatIf nothing runs and no result is returned
if ($result) {
$returnValueName = @{
0 = 'Successful completion, no reboot required'
1 = 'Successful completion, reboot required'
64 = 'Method not supported on this platform'
65 = 'Unknown failure'
66 = 'Invalid subnet mask'
67 = 'An error occurred while processing an Instance that was returned'
68 = 'Invalid input parameter'
69 = 'More than 5 gateways specified'
70 = 'Invalid IP address'
71 = 'Invalid gateway IP address'
72 = 'An error occurred while accessing the Registry for the…'
73 = 'Invalid domain name'
74 = 'Invalid host name'
75 = 'No primary/secondary WINS server defined'
76 = 'Invalid file'
77 = 'Invalid system path'
78 = 'File copy failed'
79 = 'Invalid security parameter'
80 = 'Unable to configure TCP/IP service'
81 = 'Unable to configure DHCP service'
82 = 'Unable to renew DHCP lease'
83 = 'Unable to release DHCP lease'
84 = 'IP not enabled on adapter'
85 = 'IPX not enabled on adapter'
86 = 'Frame/network number bounds error'
87 = 'Invalid frame type'
88 = 'Invalid network number'
89 = 'Duplicate network number'
90 = 'Parameter out of bounds'
91 = 'Access denied'
92 = 'Out of memory'
93 = 'Already exists'
94 = 'Path, file or object not found'
95 = 'Unable to notify service'
96 = 'Unable to notify DNS service'
97 = 'Interface not configurable'
98 = 'Not all DHCP leases could be released/renewed'
100 = 'DHCP not enabled on adapter'
}
$returnValueName[[int]$result.ReturnValue]
}This method can change the system. The -WhatIf parameter shows the operation without running it: remove it only after checking.
SetPMTUDiscovery static#
Enables Maximum Transmission Unit (MTU) discovery.
uint32 SetPMTUDiscovery([in] boolean PMTUDiscoveryEnabled);Parameters
| Parameter | Type | Direction | Description |
|---|---|---|---|
| PMTUDiscoveryEnabled | boolean | in | If true, TCP is enabled to attempt to discover the Maximum Transmission Unit (MTU) or largest packet size over the path to a remote host. The default is true. |
Return values
| Value | Label | Description |
|---|---|---|
| 0 | Successful completion, no reboot required | |
| 1 | Successful completion, reboot required | |
| 64 | Method not supported on this platform | |
| 65 | Unknown failure | |
| 66 | Invalid subnet mask | |
| 67 | An error occurred while processing an Instance that was returned | |
| 68 | Invalid input parameter | |
| 69 | More than 5 gateways specified | More than five gateways specified. |
| 70 | Invalid IP address | |
| 71 | Invalid gateway IP address | |
| 72 | An error occurred while accessing the Registry for the requested information | |
| 73 | Invalid domain name | |
| 74 | Invalid host name | |
| 75 | No primary/secondary WINS server defined | No primary or secondary WINS server defined. |
| 76 | Invalid file | |
| 77 | Invalid system path | |
| 78 | File copy failed | |
| 79 | Invalid security parameter | |
| 80 | Unable to configure TCP/IP service | |
| 81 | Unable to configure DHCP service | |
| 82 | Unable to renew DHCP lease | |
| 83 | Unable to release DHCP lease | |
| 84 | IP not enabled on adapter | |
| 85 | IPX not enabled on adapter | |
| 86 | Frame/network number bounds error | Frame or network number bounds error. |
| 87 | Invalid frame type | |
| 88 | Invalid network number | |
| 89 | Duplicate network number | |
| 90 | Parameter out of bounds | |
| 91 | Access denied | |
| 92 | Out of memory | |
| 93 | Already exists | |
| 94 | Path, file or object not found | Path, file, or object not found. |
| 95 | Unable to notify service | |
| 96 | Unable to notify DNS service | |
| 97 | Interface not configurable | |
| 98 | Not all DHCP leases could be released/renewed | Not all DHCP leases could be released or renewed. |
| 100 | DHCP not enabled on adapter | |
| 101..4294967295 | Other |
Call the SetPMTUDiscovery method
review before running# Warning: this method can change the system. -WhatIf shows the operation without running it.
$methodParameters = @{
ClassName = 'Win32_NetworkAdapterConfiguration'
MethodName = 'SetPMTUDiscovery'
Arguments = @{ PMTUDiscoveryEnabled = $false }
WhatIf = $true # Remove this line to actually run the method
}
$result = Invoke-CimMethod @methodParameters
# With -WhatIf nothing runs and no result is returned
if ($result) {
$returnValueName = @{
0 = 'Successful completion, no reboot required'
1 = 'Successful completion, reboot required'
64 = 'Method not supported on this platform'
65 = 'Unknown failure'
66 = 'Invalid subnet mask'
67 = 'An error occurred while processing an Instance that was returned'
68 = 'Invalid input parameter'
69 = 'More than 5 gateways specified'
70 = 'Invalid IP address'
71 = 'Invalid gateway IP address'
72 = 'An error occurred while accessing the Registry for the…'
73 = 'Invalid domain name'
74 = 'Invalid host name'
75 = 'No primary/secondary WINS server defined'
76 = 'Invalid file'
77 = 'Invalid system path'
78 = 'File copy failed'
79 = 'Invalid security parameter'
80 = 'Unable to configure TCP/IP service'
81 = 'Unable to configure DHCP service'
82 = 'Unable to renew DHCP lease'
83 = 'Unable to release DHCP lease'
84 = 'IP not enabled on adapter'
85 = 'IPX not enabled on adapter'
86 = 'Frame/network number bounds error'
87 = 'Invalid frame type'
88 = 'Invalid network number'
89 = 'Duplicate network number'
90 = 'Parameter out of bounds'
91 = 'Access denied'
92 = 'Out of memory'
93 = 'Already exists'
94 = 'Path, file or object not found'
95 = 'Unable to notify service'
96 = 'Unable to notify DNS service'
97 = 'Interface not configurable'
98 = 'Not all DHCP leases could be released/renewed'
100 = 'DHCP not enabled on adapter'
}
$returnValueName[[int]$result.ReturnValue]
}This method can change the system. The -WhatIf parameter shows the operation without running it: remove it only after checking.
SetTcpipNetbios #
Sets the default operation of NetBIOS over TCP/IP.
uint32 SetTcpipNetbios([in] uint32 TcpipNetbiosOptions);Parameters
| Parameter | Type | Direction | Description |
|---|---|---|---|
| TcpipNetbiosOptions | uint32 | in | Value that specifies the possible settings related to NetBIOS over TCP/IP. |
Return values
| Value | Label | Description |
|---|---|---|
| 0 | Successful completion, no reboot required | Successful completion. No reboot required. |
| 1 | Successful completion, reboot required | Successful completion. Reboot required. |
| 64 | Method not supported on this platform | |
| 65 | Unknown failure | |
| 66 | Invalid subnet mask | |
| 67 | An error occurred while processing an Instance that was returned | |
| 68 | Invalid input parameter | |
| 69 | More than 5 gateways specified | More than five gateways specified. |
| 70 | Invalid IP address | |
| 71 | Invalid gateway IP address | |
| 72 | An error occurred while accessing the Registry for the requested information | |
| 73 | Invalid domain name | |
| 74 | Invalid host name | |
| 75 | No primary/secondary WINS server defined | No primary or secondary WINS server defined. |
| 76 | Invalid file | |
| 77 | Invalid system path | |
| 78 | File copy failed | |
| 79 | Invalid security parameter | |
| 80 | Unable to configure TCP/IP service | |
| 81 | Unable to configure DHCP service | |
| 82 | Unable to renew DHCP lease | |
| 83 | Unable to release DHCP lease | |
| 84 | IP not enabled on adapter | |
| 85 | IPX not enabled on adapter | |
| 86 | Frame/network number bounds error | Frame or network number bounds error. |
| 87 | Invalid frame type | |
| 88 | Invalid network number | |
| 89 | Duplicate network number | |
| 90 | Parameter out of bounds | |
| 91 | Access denied | |
| 92 | Out of memory | |
| 93 | Already exists | |
| 94 | Path, file or object not found | Path, file, or object not found. |
| 95 | Unable to notify service | |
| 96 | Unable to notify DNS service | |
| 97 | Interface not configurable | |
| 98 | Not all DHCP leases could be released/renewed | Not all DHCP leases can be released or renewed. |
| 100 | DHCP not enabled on adapter | |
| 101..4294967295 | Other |
Call the SetTcpipNetbios method
review before running# Warning: this method can change the system. -WhatIf shows the operation without running it.
# Target instance
$instance = Get-CimInstance -ClassName Win32_NetworkAdapterConfiguration -Filter 'IPEnabled = TRUE'
$methodParameters = @{
InputObject = $instance
MethodName = 'SetTcpipNetbios'
Arguments = @{ TcpipNetbiosOptions = 1 }
WhatIf = $true # Remove this line to actually run the method
}
$result = Invoke-CimMethod @methodParameters
# With -WhatIf nothing runs and no result is returned
if ($result) {
$returnValueName = @{
0 = 'Successful completion, no reboot required'
1 = 'Successful completion, reboot required'
64 = 'Method not supported on this platform'
65 = 'Unknown failure'
66 = 'Invalid subnet mask'
67 = 'An error occurred while processing an Instance that was returned'
68 = 'Invalid input parameter'
69 = 'More than 5 gateways specified'
70 = 'Invalid IP address'
71 = 'Invalid gateway IP address'
72 = 'An error occurred while accessing the Registry for the…'
73 = 'Invalid domain name'
74 = 'Invalid host name'
75 = 'No primary/secondary WINS server defined'
76 = 'Invalid file'
77 = 'Invalid system path'
78 = 'File copy failed'
79 = 'Invalid security parameter'
80 = 'Unable to configure TCP/IP service'
81 = 'Unable to configure DHCP service'
82 = 'Unable to renew DHCP lease'
83 = 'Unable to release DHCP lease'
84 = 'IP not enabled on adapter'
85 = 'IPX not enabled on adapter'
86 = 'Frame/network number bounds error'
87 = 'Invalid frame type'
88 = 'Invalid network number'
89 = 'Duplicate network number'
90 = 'Parameter out of bounds'
91 = 'Access denied'
92 = 'Out of memory'
93 = 'Already exists'
94 = 'Path, file or object not found'
95 = 'Unable to notify service'
96 = 'Unable to notify DNS service'
97 = 'Interface not configurable'
98 = 'Not all DHCP leases could be released/renewed'
100 = 'DHCP not enabled on adapter'
}
$returnValueName[[int]$result.ReturnValue]
}This method can change the system. The -WhatIf parameter shows the operation without running it: remove it only after checking.
SetTcpMaxConnectRetransmissions static#
Sets the number of attempts TCP will retransmit a connect request before aborting.
uint32 SetTcpMaxConnectRetransmissions([in] uint32 TcpMaxConnectRetransmissions);Parameters
| Parameter | Type | Direction | Description |
|---|---|---|---|
| TcpMaxConnectRetransmissions | uint32 | in | Number of attempts TCP will retransmit a connect request before aborting. The valid range for values is 0 - 0xFFFFFFFF. |
Return values
| Value | Label | Description |
|---|---|---|
| 0 | Successful completion, no reboot required | |
| 1 | Successful completion, reboot required | |
| 64 | Method not supported on this platform | |
| 65 | Unknown failure | |
| 66 | Invalid subnet mask | |
| 67 | An error occurred while processing an Instance that was returned | |
| 68 | Invalid input parameter | |
| 69 | More than 5 gateways specified | More than five gateways specified. |
| 70 | Invalid IP address | |
| 71 | Invalid gateway IP address | |
| 72 | An error occurred while accessing the Registry for the requested information | |
| 73 | Invalid domain name | |
| 74 | Invalid host name | |
| 75 | No primary/secondary WINS server defined | No primary or secondary WINS server defined. |
| 76 | Invalid file | |
| 77 | Invalid system path | |
| 78 | File copy failed | |
| 79 | Invalid security parameter | |
| 80 | Unable to configure TCP/IP service | |
| 81 | Unable to configure DHCP service | |
| 82 | Unable to renew DHCP lease | |
| 83 | Unable to release DHCP lease | |
| 84 | IP not enabled on adapter | |
| 85 | IPX not enabled on adapter | |
| 86 | Frame/network number bounds error | Frame or network number bounds error. |
| 87 | Invalid frame type | |
| 88 | Invalid network number | |
| 89 | Duplicate network number | |
| 90 | Parameter out of bounds | |
| 91 | Access denied | |
| 92 | Out of memory | |
| 93 | Already exists | |
| 94 | Path, file or object not found | Path, file, or object not found. |
| 95 | Unable to notify service | |
| 96 | Unable to notify DNS service | |
| 97 | Interface not configurable | |
| 98 | Not all DHCP leases could be released/renewed | Not all DHCP leases could be released or renewed. |
| 100 | DHCP not enabled on adapter | |
| 101..4294967295 | Other |
Call the SetTcpMaxConnectRetransmissions method
review before running# Warning: this method can change the system. -WhatIf shows the operation without running it.
$methodParameters = @{
ClassName = 'Win32_NetworkAdapterConfiguration'
MethodName = 'SetTcpMaxConnectRetransmissions'
Arguments = @{ TcpMaxConnectRetransmissions = 0 }
WhatIf = $true # Remove this line to actually run the method
}
$result = Invoke-CimMethod @methodParameters
# With -WhatIf nothing runs and no result is returned
if ($result) {
$returnValueName = @{
0 = 'Successful completion, no reboot required'
1 = 'Successful completion, reboot required'
64 = 'Method not supported on this platform'
65 = 'Unknown failure'
66 = 'Invalid subnet mask'
67 = 'An error occurred while processing an Instance that was returned'
68 = 'Invalid input parameter'
69 = 'More than 5 gateways specified'
70 = 'Invalid IP address'
71 = 'Invalid gateway IP address'
72 = 'An error occurred while accessing the Registry for the…'
73 = 'Invalid domain name'
74 = 'Invalid host name'
75 = 'No primary/secondary WINS server defined'
76 = 'Invalid file'
77 = 'Invalid system path'
78 = 'File copy failed'
79 = 'Invalid security parameter'
80 = 'Unable to configure TCP/IP service'
81 = 'Unable to configure DHCP service'
82 = 'Unable to renew DHCP lease'
83 = 'Unable to release DHCP lease'
84 = 'IP not enabled on adapter'
85 = 'IPX not enabled on adapter'
86 = 'Frame/network number bounds error'
87 = 'Invalid frame type'
88 = 'Invalid network number'
89 = 'Duplicate network number'
90 = 'Parameter out of bounds'
91 = 'Access denied'
92 = 'Out of memory'
93 = 'Already exists'
94 = 'Path, file or object not found'
95 = 'Unable to notify service'
96 = 'Unable to notify DNS service'
97 = 'Interface not configurable'
98 = 'Not all DHCP leases could be released/renewed'
100 = 'DHCP not enabled on adapter'
}
$returnValueName[[int]$result.ReturnValue]
}This method can change the system. The -WhatIf parameter shows the operation without running it: remove it only after checking.
SetTcpMaxDataRetransmissions static#
Sets the number of times TCP will retransmit an individual data segment before aborting the connection.
uint32 SetTcpMaxDataRetransmissions([in] uint32 TcpMaxDataRetransmissions);Parameters
| Parameter | Type | Direction | Description |
|---|---|---|---|
| TcpMaxDataRetransmissions | uint32 | in | Number of times TCP retransmits an individual data segment before aborting the connection. Valid range: 0 - 0xFFFFFFFF. |
Return values
| Value | Label | Description |
|---|---|---|
| 0 | Successful completion, no reboot required | |
| 1 | Successful completion, reboot required | |
| 64 | Method not supported on this platform | |
| 65 | Unknown failure | |
| 66 | Invalid subnet mask | |
| 67 | An error occurred while processing an Instance that was returned | |
| 68 | Invalid input parameter | |
| 69 | More than 5 gateways specified | More than five gateways specified. |
| 70 | Invalid IP address | |
| 71 | Invalid gateway IP address | |
| 72 | An error occurred while accessing the Registry for the requested information | |
| 73 | Invalid domain name | |
| 74 | Invalid host name | |
| 75 | No primary/secondary WINS server defined | No primary or secondary WINS server defined. |
| 76 | Invalid file | |
| 77 | Invalid system path | |
| 78 | File copy failed | |
| 79 | Invalid security parameter | |
| 80 | Unable to configure TCP/IP service | |
| 81 | Unable to configure DHCP service | |
| 82 | Unable to renew DHCP lease | |
| 83 | Unable to release DHCP lease | |
| 84 | IP not enabled on adapter | |
| 85 | IPX not enabled on adapter | |
| 86 | Frame/network number bounds error | Frame or network number bounds error. |
| 87 | Invalid frame type | |
| 88 | Invalid network number | |
| 89 | Duplicate network number | |
| 90 | Parameter out of bounds | |
| 91 | Access denied | |
| 92 | Out of memory | |
| 93 | Already exists | |
| 94 | Path, file or object not found | Path, file, or object not found. |
| 95 | Unable to notify service | |
| 96 | Unable to notify DNS service | |
| 97 | Interface not configurable | |
| 98 | Not all DHCP leases could be released/renewed | Not all DHCP leases could be released or renewed. |
| 100 | DHCP not enabled on adapter | |
| 101..4294967295 | Other |
Call the SetTcpMaxDataRetransmissions method
review before running# Warning: this method can change the system. -WhatIf shows the operation without running it.
$methodParameters = @{
ClassName = 'Win32_NetworkAdapterConfiguration'
MethodName = 'SetTcpMaxDataRetransmissions'
Arguments = @{ TcpMaxDataRetransmissions = 0 }
WhatIf = $true # Remove this line to actually run the method
}
$result = Invoke-CimMethod @methodParameters
# With -WhatIf nothing runs and no result is returned
if ($result) {
$returnValueName = @{
0 = 'Successful completion, no reboot required'
1 = 'Successful completion, reboot required'
64 = 'Method not supported on this platform'
65 = 'Unknown failure'
66 = 'Invalid subnet mask'
67 = 'An error occurred while processing an Instance that was returned'
68 = 'Invalid input parameter'
69 = 'More than 5 gateways specified'
70 = 'Invalid IP address'
71 = 'Invalid gateway IP address'
72 = 'An error occurred while accessing the Registry for the…'
73 = 'Invalid domain name'
74 = 'Invalid host name'
75 = 'No primary/secondary WINS server defined'
76 = 'Invalid file'
77 = 'Invalid system path'
78 = 'File copy failed'
79 = 'Invalid security parameter'
80 = 'Unable to configure TCP/IP service'
81 = 'Unable to configure DHCP service'
82 = 'Unable to renew DHCP lease'
83 = 'Unable to release DHCP lease'
84 = 'IP not enabled on adapter'
85 = 'IPX not enabled on adapter'
86 = 'Frame/network number bounds error'
87 = 'Invalid frame type'
88 = 'Invalid network number'
89 = 'Duplicate network number'
90 = 'Parameter out of bounds'
91 = 'Access denied'
92 = 'Out of memory'
93 = 'Already exists'
94 = 'Path, file or object not found'
95 = 'Unable to notify service'
96 = 'Unable to notify DNS service'
97 = 'Interface not configurable'
98 = 'Not all DHCP leases could be released/renewed'
100 = 'DHCP not enabled on adapter'
}
$returnValueName[[int]$result.ReturnValue]
}This method can change the system. The -WhatIf parameter shows the operation without running it: remove it only after checking.
SetTcpNumConnections static#
Sets the maximum number of connections that TCP may have open simultaneously.
uint32 SetTcpNumConnections([in] uint32 TcpNumConnections);Parameters
| Parameter | Type | Direction | Description |
|---|---|---|---|
| TcpNumConnections | uint32 | in | Maximum number of connections that TCP may have open simultaneously. The valid range of values is 0 - 0xFFFFFE. |
Return values
| Value | Label | Description |
|---|---|---|
| 0 | Successful completion, no reboot required | |
| 1 | Successful completion, reboot required | |
| 64 | Method not supported on this platform | |
| 65 | Unknown failure | |
| 66 | Invalid subnet mask | |
| 67 | An error occurred while processing an Instance that was returned | |
| 68 | Invalid input parameter | |
| 69 | More than 5 gateways specified | More than five gateways specified. |
| 70 | Invalid IP address | |
| 71 | Invalid gateway IP address | |
| 72 | An error occurred while accessing the Registry for the requested information | |
| 73 | Invalid domain name | |
| 74 | Invalid host name | |
| 75 | No primary/secondary WINS server defined | No primary or secondary WINS server defined. |
| 76 | Invalid file | |
| 77 | Invalid system path | |
| 78 | File copy failed | |
| 79 | Invalid security parameter | |
| 80 | Unable to configure TCP/IP service | |
| 81 | Unable to configure DHCP service | |
| 82 | Unable to renew DHCP lease | |
| 83 | Unable to release DHCP lease | |
| 84 | IP not enabled on adapter | |
| 85 | IPX not enabled on adapter | |
| 86 | Frame/network number bounds error | Frame or network number bounds error. |
| 87 | Invalid frame type | |
| 88 | Invalid network number | |
| 89 | Duplicate network number | |
| 90 | Parameter out of bounds | |
| 91 | Access denied | |
| 92 | Out of memory | |
| 93 | Already exists | |
| 94 | Path, file or object not found | Path, file, or object not found. |
| 95 | Unable to notify service | |
| 96 | Unable to notify DNS service | |
| 97 | Interface not configurable | |
| 98 | Not all DHCP leases could be released/renewed | Not all DHCP leases could be released or renewed. |
| 100 | DHCP not enabled on adapter | |
| 101..4294967295 | Other |
Call the SetTcpNumConnections method
review before running# Warning: this method can change the system. -WhatIf shows the operation without running it.
$methodParameters = @{
ClassName = 'Win32_NetworkAdapterConfiguration'
MethodName = 'SetTcpNumConnections'
Arguments = @{ TcpNumConnections = 0 }
WhatIf = $true # Remove this line to actually run the method
}
$result = Invoke-CimMethod @methodParameters
# With -WhatIf nothing runs and no result is returned
if ($result) {
$returnValueName = @{
0 = 'Successful completion, no reboot required'
1 = 'Successful completion, reboot required'
64 = 'Method not supported on this platform'
65 = 'Unknown failure'
66 = 'Invalid subnet mask'
67 = 'An error occurred while processing an Instance that was returned'
68 = 'Invalid input parameter'
69 = 'More than 5 gateways specified'
70 = 'Invalid IP address'
71 = 'Invalid gateway IP address'
72 = 'An error occurred while accessing the Registry for the…'
73 = 'Invalid domain name'
74 = 'Invalid host name'
75 = 'No primary/secondary WINS server defined'
76 = 'Invalid file'
77 = 'Invalid system path'
78 = 'File copy failed'
79 = 'Invalid security parameter'
80 = 'Unable to configure TCP/IP service'
81 = 'Unable to configure DHCP service'
82 = 'Unable to renew DHCP lease'
83 = 'Unable to release DHCP lease'
84 = 'IP not enabled on adapter'
85 = 'IPX not enabled on adapter'
86 = 'Frame/network number bounds error'
87 = 'Invalid frame type'
88 = 'Invalid network number'
89 = 'Duplicate network number'
90 = 'Parameter out of bounds'
91 = 'Access denied'
92 = 'Out of memory'
93 = 'Already exists'
94 = 'Path, file or object not found'
95 = 'Unable to notify service'
96 = 'Unable to notify DNS service'
97 = 'Interface not configurable'
98 = 'Not all DHCP leases could be released/renewed'
100 = 'DHCP not enabled on adapter'
}
$returnValueName[[int]$result.ReturnValue]
}This method can change the system. The -WhatIf parameter shows the operation without running it: remove it only after checking.
SetTcpUseRFC1122UrgentPointer static#
Specifies whether TCP uses the RFC 1122 specification for urgent data, or the mode used by Berkeley Software Design (BSD) derived systems.
uint32 SetTcpUseRFC1122UrgentPointer([in] boolean TcpUseRFC1122UrgentPointer);Parameters
| Parameter | Type | Direction | Description |
|---|---|---|---|
| TcpUseRFC1122UrgentPointer | boolean | in | If true, TCP uses the RFC 1122 specification. If false, urgent data is sent in the mode used by BSD-derived systems. |
Return values
| Value | Label | Description |
|---|---|---|
| 0 | Successful completion, no reboot required | |
| 1 | Successful completion, reboot required | |
| 64 | Method not supported on this platform | |
| 65 | Unknown failure | |
| 66 | Invalid subnet mask | |
| 67 | An error occurred while processing an Instance that was returned | |
| 68 | Invalid input parameter | |
| 69 | More than 5 gateways specified | More than five gateways specified. |
| 70 | Invalid IP address | |
| 71 | Invalid gateway IP address | |
| 72 | An error occurred while accessing the Registry for the requested information | |
| 73 | Invalid domain name | |
| 74 | Invalid host name | |
| 75 | No primary/secondary WINS server defined | No primary or secondary WINS server defined. |
| 76 | Invalid file | |
| 77 | Invalid system path | |
| 78 | File copy failed | |
| 79 | Invalid security parameter | |
| 80 | Unable to configure TCP/IP service | |
| 81 | Unable to configure DHCP service | |
| 82 | Unable to renew DHCP lease | |
| 83 | Unable to release DHCP lease | |
| 84 | IP not enabled on adapter | |
| 85 | IPX not enabled on adapter | |
| 86 | Frame/network number bounds error | Frame or network number bounds error. |
| 87 | Invalid frame type | |
| 88 | Invalid network number | |
| 89 | Duplicate network number | |
| 90 | Parameter out of bounds | |
| 91 | Access denied | |
| 92 | Out of memory | |
| 93 | Already exists | |
| 94 | Path, file or object not found | Path, file, or object not found. |
| 95 | Unable to notify service | |
| 96 | Unable to notify DNS service | |
| 97 | Interface not configurable | |
| 98 | Not all DHCP leases could be released/renewed | Not all DHCP leases could be released or renewed. |
| 100 | DHCP not enabled on adapter | |
| 101..4294967295 | Other |
Call the SetTcpUseRFC1122UrgentPointer method
review before running# Warning: this method can change the system. -WhatIf shows the operation without running it.
$methodParameters = @{
ClassName = 'Win32_NetworkAdapterConfiguration'
MethodName = 'SetTcpUseRFC1122UrgentPointer'
Arguments = @{ TcpUseRFC1122UrgentPointer = $false }
WhatIf = $true # Remove this line to actually run the method
}
$result = Invoke-CimMethod @methodParameters
# With -WhatIf nothing runs and no result is returned
if ($result) {
$returnValueName = @{
0 = 'Successful completion, no reboot required'
1 = 'Successful completion, reboot required'
64 = 'Method not supported on this platform'
65 = 'Unknown failure'
66 = 'Invalid subnet mask'
67 = 'An error occurred while processing an Instance that was returned'
68 = 'Invalid input parameter'
69 = 'More than 5 gateways specified'
70 = 'Invalid IP address'
71 = 'Invalid gateway IP address'
72 = 'An error occurred while accessing the Registry for the…'
73 = 'Invalid domain name'
74 = 'Invalid host name'
75 = 'No primary/secondary WINS server defined'
76 = 'Invalid file'
77 = 'Invalid system path'
78 = 'File copy failed'
79 = 'Invalid security parameter'
80 = 'Unable to configure TCP/IP service'
81 = 'Unable to configure DHCP service'
82 = 'Unable to renew DHCP lease'
83 = 'Unable to release DHCP lease'
84 = 'IP not enabled on adapter'
85 = 'IPX not enabled on adapter'
86 = 'Frame/network number bounds error'
87 = 'Invalid frame type'
88 = 'Invalid network number'
89 = 'Duplicate network number'
90 = 'Parameter out of bounds'
91 = 'Access denied'
92 = 'Out of memory'
93 = 'Already exists'
94 = 'Path, file or object not found'
95 = 'Unable to notify service'
96 = 'Unable to notify DNS service'
97 = 'Interface not configurable'
98 = 'Not all DHCP leases could be released/renewed'
100 = 'DHCP not enabled on adapter'
}
$returnValueName[[int]$result.ReturnValue]
}This method can change the system. The -WhatIf parameter shows the operation without running it: remove it only after checking.
SetTcpWindowSize static#
Sets the maximum TCP Receive Window size offered by the system.
uint32 SetTcpWindowSize([in] uint16 TcpWindowSize);Parameters
| Parameter | Type | Direction | Description |
|---|---|---|---|
| TcpWindowSize | uint16 | in | Maximum TCP receive window size offered by the system. The valid range of values in bytes is 0 - 65535. |
Return values
| Value | Label | Description |
|---|---|---|
| 0 | Successful completion, no reboot required | |
| 1 | Successful completion, reboot required | |
| 64 | Method not supported on this platform | |
| 65 | Unknown failure | |
| 66 | Invalid subnet mask | |
| 67 | An error occurred while processing an Instance that was returned | |
| 68 | Invalid input parameter | |
| 69 | More than 5 gateways specified | More than five gateways specified. |
| 70 | Invalid IP address | |
| 71 | Invalid gateway IP address | |
| 72 | An error occurred while accessing the Registry for the requested information | |
| 73 | Invalid domain name | |
| 74 | Invalid host name | |
| 75 | No primary/secondary WINS server defined | No primary or secondary WINS server defined. |
| 76 | Invalid file | |
| 77 | Invalid system path | |
| 78 | File copy failed | |
| 79 | Invalid security parameter | |
| 80 | Unable to configure TCP/IP service | |
| 81 | Unable to configure DHCP service | |
| 82 | Unable to renew DHCP lease | |
| 83 | Unable to release DHCP lease | |
| 84 | IP not enabled on adapter | |
| 85 | IPX not enabled on adapter | |
| 86 | Frame/network number bounds error | Frame or network number bounds error. |
| 87 | Invalid frame type | |
| 88 | Invalid network number | |
| 89 | Duplicate network number | |
| 90 | Parameter out of bounds | |
| 91 | Access denied | |
| 92 | Out of memory | |
| 93 | Already exists | |
| 94 | Path, file or object not found | Path, file, or object not found. |
| 95 | Unable to notify service | |
| 96 | Unable to notify DNS service | |
| 97 | Interface not configurable | |
| 98 | Not all DHCP leases could be released/renewed | Not all DHCP leases could be released or renewed. |
| 100 | DHCP not enabled on adapter | |
| 101..4294967295 | Other |
Call the SetTcpWindowSize method
review before running# Warning: this method can change the system. -WhatIf shows the operation without running it.
$methodParameters = @{
ClassName = 'Win32_NetworkAdapterConfiguration'
MethodName = 'SetTcpWindowSize'
Arguments = @{ TcpWindowSize = 0 }
WhatIf = $true # Remove this line to actually run the method
}
$result = Invoke-CimMethod @methodParameters
# With -WhatIf nothing runs and no result is returned
if ($result) {
$returnValueName = @{
0 = 'Successful completion, no reboot required'
1 = 'Successful completion, reboot required'
64 = 'Method not supported on this platform'
65 = 'Unknown failure'
66 = 'Invalid subnet mask'
67 = 'An error occurred while processing an Instance that was returned'
68 = 'Invalid input parameter'
69 = 'More than 5 gateways specified'
70 = 'Invalid IP address'
71 = 'Invalid gateway IP address'
72 = 'An error occurred while accessing the Registry for the…'
73 = 'Invalid domain name'
74 = 'Invalid host name'
75 = 'No primary/secondary WINS server defined'
76 = 'Invalid file'
77 = 'Invalid system path'
78 = 'File copy failed'
79 = 'Invalid security parameter'
80 = 'Unable to configure TCP/IP service'
81 = 'Unable to configure DHCP service'
82 = 'Unable to renew DHCP lease'
83 = 'Unable to release DHCP lease'
84 = 'IP not enabled on adapter'
85 = 'IPX not enabled on adapter'
86 = 'Frame/network number bounds error'
87 = 'Invalid frame type'
88 = 'Invalid network number'
89 = 'Duplicate network number'
90 = 'Parameter out of bounds'
91 = 'Access denied'
92 = 'Out of memory'
93 = 'Already exists'
94 = 'Path, file or object not found'
95 = 'Unable to notify service'
96 = 'Unable to notify DNS service'
97 = 'Interface not configurable'
98 = 'Not all DHCP leases could be released/renewed'
100 = 'DHCP not enabled on adapter'
}
$returnValueName[[int]$result.ReturnValue]
}This method can change the system. The -WhatIf parameter shows the operation without running it: remove it only after checking.
SetWINSServer #
Sets the primary and secondary Windows Internet Naming Service (WINS) servers on this TCP/IP-bound network adapter.
uint32 SetWINSServer([in] string WINSPrimaryServer, [in] string WINSSecondaryServer);Parameters
| Parameter | Type | Direction | Description |
|---|---|---|---|
| WINSPrimaryServer | string | in | IP address of the primary WINS server. Note: Always verify the validity of this IP address when it is from an unknown source, or a source that you do not trust. |
| WINSSecondaryServer | string | in | IP address of the secondary WINS server. Note: Always verify the validity of this IP address when it is from an unknown source, or a source that you do not trust. |
Return values
| Value | Label | Description |
|---|---|---|
| 0 | Successful completion, no reboot required | |
| 1 | Successful completion, reboot required | |
| 64 | Method not supported on this platform | |
| 65 | Unknown failure | |
| 66 | Invalid subnet mask | |
| 67 | An error occurred while processing an Instance that was returned | |
| 68 | Invalid input parameter | |
| 69 | More than 5 gateways specified | More than five gateways specified. |
| 70 | Invalid IP address | |
| 71 | Invalid gateway IP address | |
| 72 | An error occurred while accessing the Registry for the requested information | |
| 73 | Invalid domain name | |
| 74 | Invalid host name | |
| 75 | No primary/secondary WINS server defined | No primary or secondary WINS server defined. |
| 76 | Invalid file | |
| 77 | Invalid system path | |
| 78 | File copy failed | |
| 79 | Invalid security parameter | |
| 80 | Unable to configure TCP/IP service | |
| 81 | Unable to configure DHCP service | |
| 82 | Unable to renew DHCP lease | |
| 83 | Unable to release DHCP lease | |
| 84 | IP not enabled on adapter | |
| 85 | IPX not enabled on adapter | |
| 86 | Frame/network number bounds error | Frame or network number bounds error. |
| 87 | Invalid frame type | |
| 88 | Invalid network number | |
| 89 | Duplicate network number | |
| 90 | Parameter out of bounds | |
| 91 | Access denied | |
| 92 | Out of memory | |
| 93 | Already exists | |
| 94 | Path, file or object not found | Path, file, or object not found. |
| 95 | Unable to notify service | |
| 96 | Unable to notify DNS service | |
| 97 | Interface not configurable | |
| 98 | Not all DHCP leases could be released/renewed | Not all DHCP leases could be released or renewed. |
| 100 | DHCP not enabled on adapter | |
| 101..4294967295 | Other |
Call the SetWINSServer method
review before running# Warning: this method can change the system. -WhatIf shows the operation without running it.
# Target instance
$instance = Get-CimInstance -ClassName Win32_NetworkAdapterConfiguration -Filter 'IPEnabled = TRUE'
$methodParameters = @{
InputObject = $instance
MethodName = 'SetWINSServer'
Arguments = @{
WINSPrimaryServer = 'Example'
WINSSecondaryServer = 'Example'
}
WhatIf = $true # Remove this line to actually run the method
}
$result = Invoke-CimMethod @methodParameters
# With -WhatIf nothing runs and no result is returned
if ($result) {
$returnValueName = @{
0 = 'Successful completion, no reboot required'
1 = 'Successful completion, reboot required'
64 = 'Method not supported on this platform'
65 = 'Unknown failure'
66 = 'Invalid subnet mask'
67 = 'An error occurred while processing an Instance that was returned'
68 = 'Invalid input parameter'
69 = 'More than 5 gateways specified'
70 = 'Invalid IP address'
71 = 'Invalid gateway IP address'
72 = 'An error occurred while accessing the Registry for the…'
73 = 'Invalid domain name'
74 = 'Invalid host name'
75 = 'No primary/secondary WINS server defined'
76 = 'Invalid file'
77 = 'Invalid system path'
78 = 'File copy failed'
79 = 'Invalid security parameter'
80 = 'Unable to configure TCP/IP service'
81 = 'Unable to configure DHCP service'
82 = 'Unable to renew DHCP lease'
83 = 'Unable to release DHCP lease'
84 = 'IP not enabled on adapter'
85 = 'IPX not enabled on adapter'
86 = 'Frame/network number bounds error'
87 = 'Invalid frame type'
88 = 'Invalid network number'
89 = 'Duplicate network number'
90 = 'Parameter out of bounds'
91 = 'Access denied'
92 = 'Out of memory'
93 = 'Already exists'
94 = 'Path, file or object not found'
95 = 'Unable to notify service'
96 = 'Unable to notify DNS service'
97 = 'Interface not configurable'
98 = 'Not all DHCP leases could be released/renewed'
100 = 'DHCP not enabled on adapter'
}
$returnValueName[[int]$result.ReturnValue]
}This method can change the system. The -WhatIf parameter shows the operation without running it: remove it only after checking.
Remarks
The Win32_NetworkAdapterConfiguration class is derived from CIM_Setting.
Inheritance
Superclass chain
- CIM_Setting
- Win32_NetworkAdapterConfiguration
Known subclasses
No known subclass.
Requirements
- Namespace
- root/cimv2
- Minimum client
- Windows Vista
- Minimum server
- Windows Server 2008
- Provider
- CIMWin32
- MOF file
- CIMWin32.mof
- DLL
- CIMWin32.dll
Class qualifiers
Dynamic Provider("CIMWin32") UUID("{8502C515-5FBB-11D2-AAC1-006008C78BC7}") AMENDMENT
Microsoft source
Descriptions, properties and methods come from the Microsoft documentation (MicrosoftDocs/win32 repository), published under the CC BY 4.0 licence. Formatting and translations are specific to this site; the PowerShell examples are written for it.