Win32_NetworkAdapterConfiguration

Win32 Network Adapter Configuration
root/cimv2dynamickey : Index

Represents the attributes and behaviors of a network adapter. This class includes extra properties and methods that support the management of the TCP/IP protocol that are independent from the network adapter.

On this page

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, ReturnType

Properties

61 of 61 properties
NameTypeAccessDescription
ArpAlwaysSourceRoutebooleanread

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
# Value of ArpAlwaysSourceRoute for each instance
Get-CimInstance -ClassName Win32_NetworkAdapterConfiguration -Property Index, ArpAlwaysSourceRoute |
    Select-Object -Property Index, ArpAlwaysSourceRoute
ArpUseEtherSNAPbooleanread

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
# Value of ArpUseEtherSNAP for each instance
Get-CimInstance -ClassName Win32_NetworkAdapterConfiguration -Property Index, ArpUseEtherSNAP |
    Select-Object -Property Index, ArpUseEtherSNAP
Captionstringread

Short textual description of the current object.

Code
# Value of Caption for each instance
Get-CimInstance -ClassName Win32_NetworkAdapterConfiguration -Property Index, Caption |
    Select-Object -Property Index, Caption
DatabasePathstringread

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
# Value of DatabasePath for each instance
Get-CimInstance -ClassName Win32_NetworkAdapterConfiguration -Property Index, DatabasePath |
    Select-Object -Property Index, DatabasePath
DeadGWDetectEnabledbooleanread

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
# Value of DeadGWDetectEnabled for each instance
Get-CimInstance -ClassName Win32_NetworkAdapterConfiguration -Property Index, DeadGWDetectEnabled |
    Select-Object -Property Index, DeadGWDetectEnabled
DefaultIPGatewaystring[]read

Array of IP addresses of default gateways that the computer system uses.

Example: "192.168.12.1 192.168.46.1"

Code
# Value of DefaultIPGateway for each instance
# DefaultIPGateway is an array: -ExpandProperty returns its items one by one
Get-CimInstance -ClassName Win32_NetworkAdapterConfiguration -Property DefaultIPGateway |
    Select-Object -ExpandProperty DefaultIPGateway
DefaultTOSuint8read

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
# Value of DefaultTOS for each instance
Get-CimInstance -ClassName Win32_NetworkAdapterConfiguration -Property Index, DefaultTOS |
    Select-Object -Property Index, DefaultTOS
DefaultTTLuint8read

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
# Value of DefaultTTL for each instance
Get-CimInstance -ClassName Win32_NetworkAdapterConfiguration -Property Index, DefaultTTL |
    Select-Object -Property Index, DefaultTTL
Descriptionstringread

Textual description of the current object.

Code
# Value of Description for each instance
Get-CimInstance -ClassName Win32_NetworkAdapterConfiguration -Property Index, Description |
    Select-Object -Property Index, Description
DHCPEnabledbooleanread

If TRUE, the dynamic host configuration protocol (DHCP) server automatically assigns an IP address to the computer system when establishing a network connection.

Code
# Value of DHCPEnabled for each instance
Get-CimInstance -ClassName Win32_NetworkAdapterConfiguration -Property Index, DHCPEnabled |
    Select-Object -Property Index, DHCPEnabled
DHCPLeaseExpiresdatetimeread

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
# Value of DHCPLeaseExpires for each instance
# CIM cmdlets already return a DateTime object: no conversion is needed
Get-CimInstance -ClassName Win32_NetworkAdapterConfiguration -Property Index, DHCPLeaseExpires |
    Select-Object -Property Index, DHCPLeaseExpires
DHCPLeaseObtaineddatetimeread

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
# Value of DHCPLeaseObtained for each instance
# CIM cmdlets already return a DateTime object: no conversion is needed
Get-CimInstance -ClassName Win32_NetworkAdapterConfiguration -Property Index, DHCPLeaseObtained |
    Select-Object -Property Index, DHCPLeaseObtained
DHCPServerstringread

IP address of the dynamic host configuration protocol (DHCP) server.

Example: "10.55.34.2"

Code
# Value of DHCPServer for each instance
Get-CimInstance -ClassName Win32_NetworkAdapterConfiguration -Property Index, DHCPServer |
    Select-Object -Property Index, DHCPServer
DNSDomainstringread

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
# Value of DNSDomain for each instance
Get-CimInstance -ClassName Win32_NetworkAdapterConfiguration -Property Index, DNSDomain |
    Select-Object -Property Index, DNSDomain
DNSDomainSuffixSearchOrderstring[]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
# Value of DNSDomainSuffixSearchOrder for each instance
# DNSDomainSuffixSearchOrder is an array: -ExpandProperty returns its items one by one
Get-CimInstance -ClassName Win32_NetworkAdapterConfiguration -Property DNSDomainSuffixSearchOrder |
    Select-Object -ExpandProperty DNSDomainSuffixSearchOrder
DNSEnabledForWINSResolutionbooleanread

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
# Value of DNSEnabledForWINSResolution for each instance
Get-CimInstance -ClassName Win32_NetworkAdapterConfiguration -Property Index, DNSEnabledForWINSResolution |
    Select-Object -Property Index, DNSEnabledForWINSResolution
DNSHostNamestringread

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
# Value of DNSHostName for each instance
Get-CimInstance -ClassName Win32_NetworkAdapterConfiguration -Property Index, DNSHostName |
    Select-Object -Property Index, DNSHostName
DNSServerSearchOrderstring[]read

Array of server IP addresses to be used in querying for DNS servers.

Code
# Value of DNSServerSearchOrder for each instance
# DNSServerSearchOrder is an array: -ExpandProperty returns its items one by one
Get-CimInstance -ClassName Win32_NetworkAdapterConfiguration -Property DNSServerSearchOrder |
    Select-Object -ExpandProperty DNSServerSearchOrder
DomainDNSRegistrationEnabledbooleanread

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
# Value of DomainDNSRegistrationEnabled for each instance
Get-CimInstance -ClassName Win32_NetworkAdapterConfiguration -Property Index, DomainDNSRegistrationEnabled |
    Select-Object -Property Index, DomainDNSRegistrationEnabled
ForwardBufferMemoryuint32read

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
# Value of ForwardBufferMemory for each instance
# ForwardBufferMemory is expressed in bytes: converted to GB
Get-CimInstance -ClassName Win32_NetworkAdapterConfiguration -Property Index, ForwardBufferMemory |
    Select-Object -Property @(
        'Index'
        @{ Name = 'ForwardBufferMemoryGB'; Expression = { [math]::Round($_.ForwardBufferMemory / 1GB, 2) } }
    )
FullDNSRegistrationEnabledbooleanread

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
# Value of FullDNSRegistrationEnabled for each instance
Get-CimInstance -ClassName Win32_NetworkAdapterConfiguration -Property Index, FullDNSRegistrationEnabled |
    Select-Object -Property Index, FullDNSRegistrationEnabled
GatewayCostMetricuint16[]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
# Value of GatewayCostMetric for each instance
# GatewayCostMetric is an array: -ExpandProperty returns its items one by one
Get-CimInstance -ClassName Win32_NetworkAdapterConfiguration -Property GatewayCostMetric |
    Select-Object -ExpandProperty GatewayCostMetric
IGMPLeveluint8read

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)
ValueLabelDescription
0No Multicast
1IP Multicast
2IP & IGMP multicastIP and IGMP Multicast (default)
Code
# Value of IGMPLevel for each instance
# Lookup table for IGMPLevel (values documented by Microsoft)
$iGMPLevelName = @{
    0 = 'No Multicast'
    1 = 'IP Multicast'
    2 = 'IP & IGMP multicast'
}
Get-CimInstance -ClassName Win32_NetworkAdapterConfiguration -Property Index, IGMPLevel |
    Select-Object -Property @(
        'Index'
        @{ Name = 'IGMPLevel'; Expression = { $iGMPLevelName[[int]$_.IGMPLevel] } }
    )
Index keyuint32read

Index number of the Windows network adapter configuration. The index number is used when there is more than one configuration available.

Code
# Value of Index for each instance
Get-CimInstance -ClassName Win32_NetworkAdapterConfiguration -Property Index |
    Select-Object -Property Index
InterfaceIndexuint32read

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
# Value of InterfaceIndex for each instance
Get-CimInstance -ClassName Win32_NetworkAdapterConfiguration -Property Index, InterfaceIndex |
    Select-Object -Property Index, InterfaceIndex
IPAddressstring[]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
# Value of IPAddress for each instance
# IPAddress is an array: -ExpandProperty returns its items one by one
Get-CimInstance -ClassName Win32_NetworkAdapterConfiguration -Property IPAddress |
    Select-Object -ExpandProperty IPAddress
IPConnectionMetricuint32read

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
# Value of IPConnectionMetric for each instance
Get-CimInstance -ClassName Win32_NetworkAdapterConfiguration -Property Index, IPConnectionMetric |
    Select-Object -Property Index, IPConnectionMetric
IPEnabledbooleanread

If TRUE, TCP/IP is bound and enabled on this network adapter.

Code
# Value of IPEnabled for each instance
Get-CimInstance -ClassName Win32_NetworkAdapterConfiguration -Property Index, IPEnabled |
    Select-Object -Property Index, IPEnabled
IPFilterSecurityEnabledbooleanread

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
# Value of IPFilterSecurityEnabled for each instance
Get-CimInstance -ClassName Win32_NetworkAdapterConfiguration -Property Index, IPFilterSecurityEnabled |
    Select-Object -Property Index, IPFilterSecurityEnabled
IPPortSecurityEnabledbooleanread

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
# Value of IPPortSecurityEnabled for each instance
Get-CimInstance -ClassName Win32_NetworkAdapterConfiguration -Property Index, IPPortSecurityEnabled |
    Select-Object -Property Index, IPPortSecurityEnabled
IPSecPermitIPProtocolsstring[]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
# Value of IPSecPermitIPProtocols for each instance
# IPSecPermitIPProtocols is an array: -ExpandProperty returns its items one by one
Get-CimInstance -ClassName Win32_NetworkAdapterConfiguration -Property IPSecPermitIPProtocols |
    Select-Object -ExpandProperty IPSecPermitIPProtocols
IPSecPermitTCPPortsstring[]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
# Value of IPSecPermitTCPPorts for each instance
# IPSecPermitTCPPorts is an array: -ExpandProperty returns its items one by one
Get-CimInstance -ClassName Win32_NetworkAdapterConfiguration -Property IPSecPermitTCPPorts |
    Select-Object -ExpandProperty IPSecPermitTCPPorts
IPSecPermitUDPPortsstring[]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
# Value of IPSecPermitUDPPorts for each instance
# IPSecPermitUDPPorts is an array: -ExpandProperty returns its items one by one
Get-CimInstance -ClassName Win32_NetworkAdapterConfiguration -Property IPSecPermitUDPPorts |
    Select-Object -ExpandProperty IPSecPermitUDPPorts
IPSubnetstring[]read

Array of all of the subnet masks associated with the current network adapter.

Example: "255.255.0.0"

Code
# Value of IPSubnet for each instance
# IPSubnet is an array: -ExpandProperty returns its items one by one
Get-CimInstance -ClassName Win32_NetworkAdapterConfiguration -Property IPSubnet |
    Select-Object -ExpandProperty IPSubnet
IPUseZeroBroadcastbooleanread

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
# Value of IPUseZeroBroadcast for each instance
Get-CimInstance -ClassName Win32_NetworkAdapterConfiguration -Property Index, IPUseZeroBroadcast |
    Select-Object -Property Index, IPUseZeroBroadcast
IPXAddressstringread

The Internetwork Packet Exchange (IPX) technology is no longer supported and this property does not contain useful data.

Code
# Value of IPXAddress for each instance
Get-CimInstance -ClassName Win32_NetworkAdapterConfiguration -Property Index, IPXAddress |
    Select-Object -Property Index, IPXAddress
IPXEnabledbooleanread

The Internetwork Packet Exchange (IPX) technology is no longer supported and this property does not contain useful data.

Code
# Value of IPXEnabled for each instance
Get-CimInstance -ClassName Win32_NetworkAdapterConfiguration -Property Index, IPXEnabled |
    Select-Object -Property Index, IPXEnabled
IPXFrameTypeuint32[]read

The Internetwork Packet Exchange (IPX) technology is no longer supported and this property does not contain useful data.

Values (5)
ValueLabelDescription
0Ethernet II
1Ethernet 802.3
2Ethernet 802.2
3Ethernet SNAP
255AUTO
Code
# Value of IPXFrameType for each instance
# Lookup table for IPXFrameType (values documented by Microsoft)
$iPXFrameTypeName = @{
    0 = 'Ethernet II'
    1 = 'Ethernet 802.3'
    2 = 'Ethernet 802.2'
    3 = 'Ethernet SNAP'
    255 = 'AUTO'
}
# IPXFrameType is an array: -ExpandProperty returns its items one by one
Get-CimInstance -ClassName Win32_NetworkAdapterConfiguration -Property IPXFrameType |
    Select-Object -ExpandProperty IPXFrameType |
    ForEach-Object -Process { $iPXFrameTypeName[[int]$_] }
IPXMediaTypeuint32read

The Internetwork Packet Exchange (IPX) technology is no longer supported and this property does not contain useful data.

Values (4)
ValueLabelDescription
1Ethernet
2Token ring
3FDDI
8ARCNET
Code
# Value of IPXMediaType for each instance
# Lookup table for IPXMediaType (values documented by Microsoft)
$iPXMediaTypeName = @{
    1 = 'Ethernet'
    2 = 'Token ring'
    3 = 'FDDI'
    8 = 'ARCNET'
}
Get-CimInstance -ClassName Win32_NetworkAdapterConfiguration -Property Index, IPXMediaType |
    Select-Object -Property @(
        'Index'
        @{ Name = 'IPXMediaType'; Expression = { $iPXMediaTypeName[[int]$_.IPXMediaType] } }
    )
IPXNetworkNumberstring[]read

The Internetwork Packet Exchange (IPX) technology is no longer supported and this property does not contain useful data.

Code
# Value of IPXNetworkNumber for each instance
# IPXNetworkNumber is an array: -ExpandProperty returns its items one by one
Get-CimInstance -ClassName Win32_NetworkAdapterConfiguration -Property IPXNetworkNumber |
    Select-Object -ExpandProperty IPXNetworkNumber
IPXVirtualNetNumberstringread

The Internetwork Packet Exchange (IPX) technology is no longer supported and this property does not contain useful data.

Code
# Value of IPXVirtualNetNumber for each instance
Get-CimInstance -ClassName Win32_NetworkAdapterConfiguration -Property Index, IPXVirtualNetNumber |
    Select-Object -Property Index, IPXVirtualNetNumber
KeepAliveIntervaluint32read

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
# Value of KeepAliveInterval for each instance
Get-CimInstance -ClassName Win32_NetworkAdapterConfiguration -Property Index, KeepAliveInterval |
    Select-Object -Property Index, KeepAliveInterval
KeepAliveTimeuint32read

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
# Value of KeepAliveTime for each instance
Get-CimInstance -ClassName Win32_NetworkAdapterConfiguration -Property Index, KeepAliveTime |
    Select-Object -Property Index, KeepAliveTime
MACAddressstringread

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
# Value of MACAddress for each instance
Get-CimInstance -ClassName Win32_NetworkAdapterConfiguration -Property Index, MACAddress |
    Select-Object -Property Index, MACAddress
MTUuint32read

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
# Value of MTU for each instance
# MTU is expressed in bytes: converted to GB
Get-CimInstance -ClassName Win32_NetworkAdapterConfiguration -Property Index, MTU |
    Select-Object -Property @(
        'Index'
        @{ Name = 'MTUGB'; Expression = { [math]::Round($_.MTU / 1GB, 2) } }
    )
NumForwardPacketsuint32read

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
# Value of NumForwardPackets for each instance
Get-CimInstance -ClassName Win32_NetworkAdapterConfiguration -Property Index, NumForwardPackets |
    Select-Object -Property Index, NumForwardPackets
PMTUBHDetectEnabledbooleanread

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
# Value of PMTUBHDetectEnabled for each instance
Get-CimInstance -ClassName Win32_NetworkAdapterConfiguration -Property Index, PMTUBHDetectEnabled |
    Select-Object -Property Index, PMTUBHDetectEnabled
PMTUDiscoveryEnabledbooleanread

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
# Value of PMTUDiscoveryEnabled for each instance
Get-CimInstance -ClassName Win32_NetworkAdapterConfiguration -Property Index, PMTUDiscoveryEnabled |
    Select-Object -Property Index, PMTUDiscoveryEnabled
ServiceNamestringread

Service name of the network adapter. This name is usually shorter than the full product name.

Example: "Elnkii"

Code
# Value of ServiceName for each instance
Get-CimInstance -ClassName Win32_NetworkAdapterConfiguration -Property Index, ServiceName |
    Select-Object -Property Index, ServiceName
SettingIDstringread

Identifier by which the current object is known.

Code
# Value of SettingID for each instance
Get-CimInstance -ClassName Win32_NetworkAdapterConfiguration -Property Index, SettingID |
    Select-Object -Property Index, SettingID
TcpipNetbiosOptionsuint32read

Bitmap of the possible settings related to NetBIOS over TCP/IP. Values are identified in the following list.

Values (3)
ValueLabelDescription
0EnableNetbiosViaDhcp
1EnableNetbios
2DisableNetbios
Code
# Value of TcpipNetbiosOptions for each instance
# Lookup table for TcpipNetbiosOptions (values documented by Microsoft)
$tcpipNetbiosOptionsName = @{
    0 = 'EnableNetbiosViaDhcp'
    1 = 'EnableNetbios'
    2 = 'DisableNetbios'
}
Get-CimInstance -ClassName Win32_NetworkAdapterConfiguration -Property Index, TcpipNetbiosOptions |
    Select-Object -Property @(
        'Index'
        @{ Name = 'TcpipNetbiosOptions'; Expression = { $tcpipNetbiosOptionsName[[int]$_.TcpipNetbiosOptions] } }
    )
TcpMaxConnectRetransmissionsuint32read

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
# Value of TcpMaxConnectRetransmissions for each instance
Get-CimInstance -ClassName Win32_NetworkAdapterConfiguration -Property Index, TcpMaxConnectRetransmissions |
    Select-Object -Property Index, TcpMaxConnectRetransmissions
TcpMaxDataRetransmissionsuint32read

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
# Value of TcpMaxDataRetransmissions for each instance
Get-CimInstance -ClassName Win32_NetworkAdapterConfiguration -Property Index, TcpMaxDataRetransmissions |
    Select-Object -Property Index, TcpMaxDataRetransmissions
TcpNumConnectionsuint32read

Maximum number of connections that TCP can have open simultaneously. Default: 0xFFFFFE, Valid Range: 0 - 0xFFFFFE.

Code
# Value of TcpNumConnections for each instance
Get-CimInstance -ClassName Win32_NetworkAdapterConfiguration -Property Index, TcpNumConnections |
    Select-Object -Property Index, TcpNumConnections
TcpUseRFC1122UrgentPointerbooleanread

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
# Value of TcpUseRFC1122UrgentPointer for each instance
Get-CimInstance -ClassName Win32_NetworkAdapterConfiguration -Property Index, TcpUseRFC1122UrgentPointer |
    Select-Object -Property Index, TcpUseRFC1122UrgentPointer
TcpWindowSizeuint16read

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 "CurrentControlSet\Services\Tcpip\Parameters|TcpWindowSize" registry entry, which is not used in the current implementation of the operating system.

Unit: bytes

Code
# Value of TcpWindowSize for each instance
# TcpWindowSize is expressed in bytes: converted to GB
Get-CimInstance -ClassName Win32_NetworkAdapterConfiguration -Property Index, TcpWindowSize |
    Select-Object -Property @(
        'Index'
        @{ Name = 'TcpWindowSizeGB'; Expression = { [math]::Round($_.TcpWindowSize / 1GB, 2) } }
    )
WINSEnableLMHostsLookupbooleanread

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
# Value of WINSEnableLMHostsLookup for each instance
Get-CimInstance -ClassName Win32_NetworkAdapterConfiguration -Property Index, WINSEnableLMHostsLookup |
    Select-Object -Property Index, WINSEnableLMHostsLookup
WINSHostLookupFilestringread

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
# Value of WINSHostLookupFile for each instance
Get-CimInstance -ClassName Win32_NetworkAdapterConfiguration -Property Index, WINSHostLookupFile |
    Select-Object -Property Index, WINSHostLookupFile
WINSPrimaryServerstringread

IP address for the primary WINS server.

Code
# Value of WINSPrimaryServer for each instance
Get-CimInstance -ClassName Win32_NetworkAdapterConfiguration -Property Index, WINSPrimaryServer |
    Select-Object -Property Index, WINSPrimaryServer
WINSScopeIDstringread

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
# Value of WINSScopeID for each instance
Get-CimInstance -ClassName Win32_NetworkAdapterConfiguration -Property Index, WINSScopeID |
    Select-Object -Property Index, WINSScopeID
WINSSecondaryServerstringread

IP address for the secondary WINS server.

Code
# Value of WINSSecondaryServer for each instance
Get-CimInstance -ClassName Win32_NetworkAdapterConfiguration -Property Index, WINSSecondaryServer |
    Select-Object -Property Index, WINSSecondaryServer

Methods

DisableIPSec #

Disables IPsec on this TCP/IP-enabled network adapter.

uint32 DisableIPSec();

Return values

ValueLabelDescription
0Successful completion, no reboot required
1Successful completion, reboot required
64Method not supported on this platform
65Unknown failure
66Invalid subnet mask
67An error occurred while processing an Instance that was returned
68Invalid input parameter
69More than 5 gateways specifiedMore than five gateways specified.
70Invalid IP address
71Invalid gateway IP address
72An error occurred while accessing the Registry for the requested information
73Invalid domain name
74Invalid host name
75No primary/secondary WINS server definedNo primary or secondary WINS server defined.
76Invalid file
77Invalid system path
78File copy failed
79Invalid security parameter
80Unable to configure TCP/IP service
81Unable to configure DHCP service
82Unable to renew DHCP lease
83Unable to release DHCP lease
84IP not enabled on adapter
85IPX not enabled on adapter
86Frame/network number bounds errorFrame or network number bounds error.
87Invalid frame type
88Invalid network number
89Duplicate network number
90Parameter out of bounds
91Access denied
92Out of memory
93Already exists
94Path, file or object not foundPath, file, or object not found.
95Unable to notify service
96Unable to notify DNS service
97Interface not configurable
98Not all DHCP leases could be released/renewedNot all DHCP leases could be released or renewed.
100DHCP not enabled on adapterDHCP not enabled on the adapter.
101..4294967295Other

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

ValueLabelDescription
0Successful completion, no reboot required
1Successful completion, reboot required
64Method not supported on this platform
65Unknown failure
66Invalid subnet mask
67An error occurred while processing an Instance that was returned
68Invalid input parameter
69More than 5 gateways specifiedMore than five gateways specified.
70Invalid IP address
71Invalid gateway IP address
72An error occurred while accessing the Registry for the requested information
73Invalid domain name
74Invalid host name
75No primary/secondary WINS server definedNo primary or secondary WINS server defined.
76Invalid file
77Invalid system path
78File copy failed
79Invalid security parameter
80Unable to configure TCP/IP service
81Unable to configure DHCP service
82Unable to renew DHCP lease
83Unable to release DHCP lease
84IP not enabled on adapter
85IPX not enabled on adapter
86Frame/network number bounds errorFrame or network number bounds error.
87Invalid frame type
88Invalid network number
89Duplicate network number
90Parameter out of bounds
91Access denied
92Out of memory
93Already exists
94Path, file or object not foundPath, file, or object not found.
95Unable to notify service
96Unable to notify DNS service
97Interface not configurable
98Not all DHCP leases could be released/renewedNot all DHCP leases could be released or renewed.
100DHCP not enabled on adapterDHCP not enabled on the adapter.
101..4294967295Other

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

ParameterTypeDirectionDescription
DNSHostNamestringin

Name of the DNS host that this method enables.

Example: "corpdns"

DNSDomainstringin

Represents an organization name followed by a period and an extension that indicates the type of organization.

Example: "microsoft.com"

DNSServerSearchOrderstring[]in

List of server IP addresses to query for DNS servers.

DNSDomainSuffixSearchOrderstring[]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

ValueLabelDescription
0Successful completion, no reboot required
1Successful completion, reboot required
64Method not supported on this platform
65Unknown failure
66Invalid subnet mask
67An error occurred while processing an Instance that was returned
68Invalid input parameter
69More than 5 gateways specifiedMore than five gateways specified.
70Invalid IP address
71Invalid gateway IP address
72An error occurred while accessing the Registry for the requested information
73Invalid domain name
74Invalid host name
75No primary/secondary WINS server definedNo primary or secondary WINS server defined.
76Invalid file
77Invalid system path
78File copy failed
79Invalid security parameter
80Unable to configure TCP/IP service
81Unable to configure DHCP service
82Unable to renew DHCP lease
83Unable to release DHCP lease
84IP not enabled on adapter
85IPX not enabled on adapter
86Frame/network number bounds errorFrame or network number bounds error.
87Invalid frame type
88Invalid network number
89Duplicate network number
90Parameter out of bounds
91Access denied
92Out of memory
93Already exists
94Path, file or object not foundPath, file, or object not found.
95Unable to notify service
96Unable to notify DNS service
97Interface not configurable
98Not all DHCP leases could be released/renewedNot all DHCP leases can be released or renewed.
100DHCP not enabled on adapter
101..4294967295Other

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

ParameterTypeDirectionDescription
IPFilterSecurityEnabledbooleanin

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

ValueLabelDescription
0Successful completion, no reboot required
1Successful completion, reboot required
64Method not supported on this platform
65Unknown failure
66Invalid subnet mask
67An error occurred while processing an Instance that was returned
68Invalid input parameter
69More than 5 gateways specifiedMore than five gateways specified.
70Invalid IP address
71Invalid gateway IP address
72An error occurred while accessing the Registry for the requested information
73Invalid domain name
74Invalid host name
75No primary/secondary WINS server definedNo primary or secondary WINS server defined.
76Invalid file
77Invalid system path
78File copy failed
79Invalid security parameter
80Unable to configure TCP/IP service
81Unable to configure DHCP service
82Unable to renew DHCP lease
83Unable to release DHCP lease
84IP not enabled on adapter
85IPX not enabled on adapter
86Frame/network number bounds errorFrame or network number bounds error.
87Invalid frame type
88Invalid network number
89Duplicate network number
90Parameter out of bounds
91Access denied
92Out of memory
93Already exists
94Path, file or object not foundPath, file, or object not found.
95Unable to notify service
96Unable to notify DNS service
97Interface not configurable
98Not all DHCP leases could be released/renewedNot all DHCP leases could be released or renewed.
100DHCP not enabled on adapterDHCP not enabled on the adapter.
101..4294967295Other

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

ParameterTypeDirectionDescription
IPSecPermitTCPPortsstring[]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.

IPSecPermitUDPPortsstring[]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.

IPSecPermitIPProtocolsstring[]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

ValueLabelDescription
0Successful completion, no reboot required
1Successful completion, reboot required
64Method not supported on this platform
65Unknown failure
66Invalid subnet mask
67An error occurred while processing an Instance that was returned
68Invalid input parameter
69More than 5 gateways specifiedMore than five gateways specified.
70Invalid IP address
71Invalid gateway IP address
72An error occurred while accessing the Registry for the requested information
73Invalid domain name
74Invalid host name
75No primary/secondary WINS server definedNo primary or secondary WINS server defined.
76Invalid file
77Invalid system path
78File copy failed
79Invalid security parameter
80Unable to configure TCP/IP service
81Unable to configure DHCP service
82Unable to renew DHCP lease
83Unable to release DHCP lease
84IP not enabled on adapter
85IPX not enabled on adapter
86Frame/network number bounds errorFrame or network number bounds error.
87Invalid frame type
88Invalid network number
89Duplicate network number
90Parameter out of bounds
91Access denied
92Out of memory
93Already exists
94Path, file or object not foundPath, file, or object not found.
95Unable to notify service
96Unable to notify DNS service
97Interface not configurable
98Not all DHCP leases could be released/renewedNot all DHCP leases could be released or renewed.
100DHCP not enabled on adapterDHCP not enabled on the adapter.
101..4294967295Other

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

ParameterTypeDirectionDescription
IPAddressstring[]in

Lists all of the static IP addresses for the current network adapter.

Example: 155.34.22.0.

SubnetMaskstring[]in

Subnet masks that complement the values in the *IPAddress* parameter.

Example: 255.255.0.0.

Return values

ValueLabelDescription
0Successful completion, no reboot required
1Successful completion, reboot required
64Method not supported on this platform
65Unknown failure
66Invalid subnet mask
67An error occurred while processing an Instance that was returned
68Invalid input parameter
69More than 5 gateways specifiedMore than five gateways specified.
70Invalid IP address
71Invalid gateway IP address
72An error occurred while accessing the Registry for the requested information
73Invalid domain name
74Invalid host name
75No primary/secondary WINS server definedNo primary or secondary WINS server defined.
76Invalid file
77Invalid system path
78File copy failed
79Invalid security parameter
80Unable to configure TCP/IP service
81Unable to configure DHCP serviceUnable to configure DHCP service. For more information, see the Remarks section.
82Unable to renew DHCP lease
83Unable to release DHCP lease
84IP not enabled on adapter
85IPX not enabled on adapter
86Frame/network number bounds errorFrame or network number bounds error.
87Invalid frame type
88Invalid network number
89Duplicate network number
90Parameter out of bounds
91Access denied
92Out of memory
93Already exists
94Path, file or object not foundPath, file, or object not found.
95Unable to notify service
96Unable to notify DNS service
97Interface not configurable
98Not all DHCP leases could be released/renewedNot all DHCP leases could be released or renewed.
100DHCP not enabled on adapter
2147786788Write lock not enabled. For more information, see INetCfgLock::AcquireWriteLock).
101..4294967295Other

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

ParameterTypeDirectionDescription
DNSEnabledForWINSResolutionbooleanin

If true, the Domain Name System (DNS) is enabled for name resolution over WINS resolution.

WINSEnableLMHostsLookupbooleanin

If true, local lookup files are used. Lookup files will contain mappings of IP addresses to host names.

WINSHostLookupFilestringin

Lookup files that contain mappings of IP addresses to host names. If available, the files will be found in %SystemRoot%\system32\drivers\ .

WINSScopeIDstringin

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

ValueLabelDescription
0Successful completion, no reboot required
1Successful completion, reboot required
64Method not supported on this platform
65Unknown failure
66Invalid subnet mask
67An error occurred while processing an Instance that was returned
68Invalid input parameter
69More than 5 gateways specified
70Invalid IP address
71Invalid gateway IP address
72An error occurred while accessing the Registry for the requested information
73Invalid domain name
74Invalid host name
75No primary/secondary WINS server defined
76Invalid file
77Invalid system path
78File copy failed
79Invalid security parameter
80Unable to configure TCP/IP service
81Unable to configure DHCP service
82Unable to renew DHCP lease
83Unable to release DHCP lease
84IP not enabled on adapter
85IPX not enabled on adapter
86Frame/network number bounds error
87Invalid frame type
88Invalid network number
89Duplicate network number
90Parameter out of bounds
91Access denied
92Out of memory
93Already exists
94Path, file or object not found
95Unable to notify service
96Unable to notify DNS service
97Interface not configurable
98Not all DHCP leases could be released/renewed
100DHCP not enabled on adapter
101..4294967295Other

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

ValueLabelDescription
0Successful completion, no reboot required
1Successful completion, reboot required
64Method not supported on this platform
65Unknown failure
66Invalid subnet mask
67An error occurred while processing an Instance that was returned
68Invalid input parameter
69More than 5 gateways specifiedMore than five gateways specified.
70Invalid IP address
71Invalid gateway IP address
72An error occurred while accessing the Registry for the requested information
73Invalid domain name
74Invalid host name
75No primary/secondary WINS server definedNo primary or secondary WINS server defined.
76Invalid file
77Invalid system path
78File copy failed
79Invalid security parameter
80Unable to configure TCP/IP service
81Unable to configure DHCP service
82Unable to renew DHCP lease
83Unable to release DHCP lease
84IP not enabled on adapter
85IPX not enabled on adapter
86Frame/network number bounds errorFrame or network number bounds error.
87Invalid frame type
88Invalid network number
89Duplicate network number
90Parameter out of bounds
91Access denied
92Out of memory
93Already exists
94Path, file or object not foundPath, file, or object not found.
95Unable to notify service
96Unable to notify DNS service
97Interface not configurable
98Not all DHCP leases could be released/renewedNot all DHCP leases could be released or renewed.
100DHCP not enabled on adapter
101..4294967295Other

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

ValueLabelDescription
0Successful completion, no reboot required
1Successful completion, reboot required
64Method not supported on this platform
65Unknown failure
66Invalid subnet mask
67An error occurred while processing an Instance that was returned
68Invalid input parameter
69More than 5 gateways specifiedMore than five gateways specified.
70Invalid IP address
71Invalid gateway IP address
72An error occurred while accessing the Registry for the requested information
73Invalid domain name
74Invalid host name
75No primary/secondary WINS server definedNo primary or secondary WINS server defined.
76Invalid file
77Invalid system path
78File copy failed
79Invalid security parameter
80Unable to configure TCP/IP service
81Unable to configure DHCP service
82Unable to renew DHCP lease
83Unable to release DHCP lease
84IP not enabled on adapter
85IPX not enabled on adapter
86Frame/network number bounds errorFrame or network number bounds error.
87Invalid frame type
88Invalid network number
89Duplicate network number
90Parameter out of bounds
91Access denied
92Out of memory
93Already exists
94Path, file or object not foundPath, file, or object not found.
95Unable to notify service
96Unable to notify DNS service
97Interface not configurable
98Not all DHCP leases could be released/renewedNot all DHCP leases could be released or renewed.
100DHCP not enabled on adapter
101..4294967295Other

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

ValueLabelDescription
0Successful completion, no reboot required
1Successful completion, reboot required
64Method not supported on this platform
65Unknown failure
66Invalid subnet mask
67An error occurred while processing an Instance that was returned
68Invalid input parameter
69More than 5 gateways specifiedMore than five gateways specified.
70Invalid IP address
71Invalid gateway IP address
72An error occurred while accessing the Registry for the requested information
73Invalid domain name
74Invalid host name
75No primary/secondary WINS server definedNo primary or secondary WINS server defined.
76Invalid file
77Invalid system path
78File copy failed
79Invalid security parameter
80Unable to configure TCP/IP service
81Unable to configure DHCP service
82Unable to renew DHCP lease
83Unable to release DHCP lease
84IP not enabled on adapter
85IPX not enabled on adapter
86Frame/network number bounds errorFrame or network number bounds error.
87Invalid frame type
88Invalid network number
89Duplicate network number
90Parameter out of bounds
91Access denied
92Out of memory
93Already exists
94Path, file or object not foundPath, file, or object not found.
95Unable to notify service
96Unable to notify DNS service
97Interface not configurable
98Not all DHCP leases could be released/renewedNot all DHCP leases could be released or renewed.
100DHCP not enabled on adapter
101..4294967295Other

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

ValueLabelDescription
0Successful completion, no reboot required
1Successful completion, reboot required
64Method not supported on this platform
65Unknown failure
66Invalid subnet mask
67An error occurred while processing an Instance that was returned
68Invalid input parameter
69More than 5 gateways specifiedMore than five gateways specified.
70Invalid IP address
71Invalid gateway IP address
72An error occurred while accessing the Registry for the requested information
73Invalid domain name
74Invalid host name
75No primary/secondary WINS server definedNo primary or secondary WINS server defined.
76Invalid file
77Invalid system path
78File copy failed
79Invalid security parameter
80Unable to configure TCP/IP service
81Unable to configure DHCP service
82Unable to renew DHCP lease
83Unable to release DHCP lease
84IP not enabled on adapter
85IPX not enabled on adapter
86Frame/network number bounds errorFrame or network number bounds error.
87Invalid frame type
88Invalid network number
89Duplicate network number
90Parameter out of bounds
91Access denied
92Out of memory
93Already exists
94Path, file or object not foundPath, file, or object not found.
95Unable to notify service
96Unable to notify DNS service
97Interface not configurable
98Not all DHCP leases could be released/renewedNot all DHCP leases could be released or renewed.
100DHCP not enabled on adapter
101..4294967295Other

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

ParameterTypeDirectionDescription
ArpAlwaysSourceRoutebooleanin

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

ValueLabelDescription
0Successful completion, no reboot required
1Successful completion, reboot required
64Method not supported on this platform
65Unknown failure
66Invalid subnet mask
67An error occurred while processing an Instance that was returned
68Invalid input parameter
69More than 5 gateways specifiedMore than five gateways specified.
70Invalid IP address
71Invalid gateway IP address
72An error occurred while accessing the Registry for the requested information
73Invalid domain name
74Invalid host name
75No primary/secondary WINS server definedNo primary or secondary WINS server defined.
76Invalid file
77Invalid system path
78File copy failed
79Invalid security parameter
80Unable to configure TCP/IP service
81Unable to configure DHCP service
82Unable to renew DHCP lease
83Unable to release DHCP lease
84IP not enabled on adapter
85IPX not enabled on adapter
86Frame/network number bounds errorFrame or network number bounds error.
87Invalid frame type
88Invalid network number
89Duplicate network number
90Parameter out of bounds
91Access denied
92Out of memory
93Already exists
94Path, file or object not foundPath, file, or object not found.
95Unable to notify service
96Unable to notify DNS service
97Interface not configurable
98Not all DHCP leases could be released/renewedNot all DHCP leases could be released or renewed.
100DHCP not enabled on adapter
101..4294967295Other

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

ParameterTypeDirectionDescription
ArpUseEtherSNAPbooleanin

If true enables TCP/IP to transmit Ethernet packets using 802.3 SNAP encoding.

Return values

ValueLabelDescription
0Successful completion, no reboot required
1Successful completion, reboot required
64Method not supported on this platform
65Unknown failure
66Invalid subnet mask
67An error occurred while processing an Instance that was returned
68Invalid input parameter
69More than 5 gateways specifiedMore than five gateways specified.
70Invalid IP address
71Invalid gateway IP address
72An error occurred while accessing the Registry for the requested information
73Invalid domain name
74Invalid host name
75No primary/secondary WINS server definedNo primary or secondary WINS server defined.
76Invalid file
77Invalid system path
78File copy failed
79Invalid security parameter
80Unable to configure TCP/IP service
81Unable to configure DHCP service
82Unable to renew DHCP lease
83Unable to release DHCP lease
84IP not enabled on adapter
85IPX not enabled on adapter
86Frame/network number bounds errorFrame or network number bounds error.
87Invalid frame type
88Invalid network number
89Duplicate network number
90Parameter out of bounds
91Access denied
92Out of memory
93Already exists
94Path, file or object not foundPath, file, or object not found.
95Unable to notify service
96Unable to notify DNS service
97Interface not configurable
98Not all DHCP leases could be released/renewedNot all DHCP leases could be released or renewed.
100DHCP not enabled on adapter
101..4294967295Other

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

ParameterTypeDirectionDescription
DatabasePathstringin

Valid file path to standard Internet database files (HOSTS, LMHOSTS, NETWORKS, and PROTOCOLS) used by the Windows Sockets interface.

Return values

ValueLabelDescription
0Successful completion, no reboot required
1Successful completion, reboot required
64Method not supported on this platform
65Unknown failure
66Invalid subnet mask
67An error occurred while processing an Instance that was returned
68Invalid input parameter
69More than 5 gateways specifiedMore than five gateways specified.
70Invalid IP address
71Invalid gateway IP address
72An error occurred while accessing the Registry for the requested information
73Invalid domain name
74Invalid host name
75No primary/secondary WINS server definedNo primary or secondary WINS server defined.
76Invalid file
77Invalid system path
78File copy failed
79Invalid security parameter
80Unable to configure TCP/IP service
81Unable to configure DHCP service
82Unable to renew DHCP lease
83Unable to release DHCP lease
84IP not enabled on adapter
85IPX not enabled on adapter
86Frame/network number bounds errorFrame or network number bounds error.
87Invalid frame type
88Invalid network number
89Duplicate network number
90Parameter out of bounds
91Access denied
92Out of memory
93Already exists
94Path, file or object not foundPath, file, or object not found.
95Unable to notify service
96Unable to notify DNS service
97Interface not configurable
98Not all DHCP leases could be released/renewedNot all DHCP leases could be released or renewed.
100DHCP not enabled on adapter
101..4294967295Other

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

ParameterTypeDirectionDescription
DeadGWDetectEnabledbooleanin

If true, dead gateway detection should be enabled.

Return values

ValueLabelDescription
0Successful completion, no reboot required
1Successful completion, reboot required
64Method not supported on this platform
65Unknown failure
66Invalid subnet mask
67An error occurred while processing an Instance that was returned
68Invalid input parameter
69More than 5 gateways specifiedMore than five gateways specified.
70Invalid IP address
71Invalid gateway IP address
72An error occurred while accessing the Registry for the requested information
73Invalid domain name
74Invalid host name
75No primary/secondary WINS server definedNo primary or secondary WINS server defined.
76Invalid file
77Invalid system path
78File copy failed
79Invalid security parameter
80Unable to configure TCP/IP service
81Unable to configure DHCP service
82Unable to renew DHCP lease
83Unable to release DHCP lease
84IP not enabled on adapter
85IPX not enabled on adapter
86Frame/network number bounds errorFrame or network number bounds error.
87Invalid frame type
88Invalid network number
89Duplicate network number
90Parameter out of bounds
91Access denied
92Out of memory
93Already exists
94Path, file or object not foundPath, file, or object not found.
95Unable to notify service
96Unable to notify DNS service
97Interface not configurable
98Not all DHCP leases could be released/renewedNot all DHCP leases could be released or renewed.
100DHCP not enabled on adapter
101..4294967295Other

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

ParameterTypeDirectionDescription
DefaultTOSuint8in

Type of Service (TOS) value put in the header of outgoing IP packets. For a definition of the values, see RFC 791.

Return values

ValueLabelDescription
0Successful completion, no reboot required
1Successful completion, reboot required
64Method not supported on this platform
65Unknown failure
66Invalid subnet mask
67An error occurred while processing an Instance that was returned
68Invalid input parameter
69More than 5 gateways specifiedMore than five gateways specified.
70Invalid IP address
71Invalid gateway IP address
72An error occurred while accessing the Registry for the requested information
73Invalid domain name
74Invalid host name
75No primary/secondary WINS server definedNo primary or secondary WINS server defined.
76Invalid file
77Invalid system path
78File copy failed
79Invalid security parameter
80Unable to configure TCP/IP service
81Unable to configure DHCP service
82Unable to renew DHCP lease
83Unable to release DHCP lease
84IP not enabled on adapter
85IPX not enabled on adapter
86Frame/network number bounds errorFrame or network number bounds error.
87Invalid frame type
88Invalid network number
89Duplicate network number
90Parameter out of bounds
91Access denied
92Out of memory
93Already exists
94Path, file or object not foundPath, file, or object not found.
95Unable to notify service
96Unable to notify DNS service
97Interface not configurable
98Not all DHCP leases could be released/renewedNot all DHCP leases could be released or renewed.
100DHCP not enabled on adapter
101..4294967295Other

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

ParameterTypeDirectionDescription
DefaultTTLuint8in

Time to Live value set in the header of outgoing IP packets. The default value is 32; Valid range: 1 - 255

Return values

ValueLabelDescription
0Successful completion, no reboot required
1Successful completion, reboot required
64Method not supported on this platform
65Unknown failure
66Invalid subnet mask
67An error occurred while processing an Instance that was returned
68Invalid input parameter
69More than 5 gateways specifiedMore than five gateways specified.
70Invalid IP address
71Invalid gateway IP address
72An error occurred while accessing the Registry for the requested information
73Invalid domain name
74Invalid host name
75No primary/secondary WINS server definedNo primary or secondary WINS server defined.
76Invalid file
77Invalid system path
78File copy failed
79Invalid security parameter
80Unable to configure TCP/IP service
81Unable to configure DHCP service
82Unable to renew DHCP lease
83Unable to release DHCP lease
84IP not enabled on adapter
85IPX not enabled on adapter
86Frame/network number bounds errorFrame or network number bounds error.
87Invalid frame type
88Invalid network number
89Duplicate network number
90Parameter out of bounds
91Access denied
92Out of memory
93Already exists
94Path, file or object not foundPath, file, or object not found.
95Unable to notify service
96Unable to notify DNS service
97Interface not configurable
98Not all DHCP leases could be released/renewedNot all DHCP leases could be released or renewed.
100DHCP not enabled on adapter
101..4294967295Other

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

ParameterTypeDirectionDescription
DNSDomainstringin

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

ValueLabelDescription
0Successful completion, no reboot required
1Successful completion, reboot required
64Method not supported on this platform
65Unknown failure
66Invalid subnet mask
67An error occurred while processing an Instance that was returned
68Invalid input parameter
69More than 5 gateways specifiedMore than five gateways specified.
70Invalid IP address
71Invalid gateway IP address
72An error occurred while accessing the Registry for the requested information
73Invalid domain name
74Invalid host name
75No primary/secondary WINS server definedNo primary or secondary WINS server defined.
76Invalid file
77Invalid system path
78File copy failed
79Invalid security parameter
80Unable to configure TCP/IP service
81Unable to configure DHCP service
82Unable to renew DHCP lease
83Unable to release DHCP lease
84IP not enabled on adapter
85IPX not enabled on adapter
86Frame/network number bounds errorFrame or network number bounds error.
87Invalid frame type
88Invalid network number
89Duplicate network number
90Parameter out of bounds
91Access denied
92Out of memory
93Already exists
94Path, file or object not foundPath, file, or object not found.
95Unable to notify service
96Unable to notify DNS service
97Interface not configurable
98Not all DHCP leases could be released/renewedNot all DHCP leases can be released or renewed.
100DHCP not enabled on adapter
101..4294967295Other

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

ParameterTypeDirectionDescription
DNSServerSearchOrderstring[]in

List of server IP addresses to query for DNS servers.

Example: 130.215.24.1 or 157.54.164.1

Return values

ValueLabelDescription
0Successful completion, no reboot required
1Successful completion, reboot required
64Method not supported on this platform
65Unknown failure
66Invalid subnet mask
67An error occurred while processing an Instance that was returned
68Invalid input parameter
69More than 5 gateways specified
70Invalid IP address
71Invalid gateway IP address
72An error occurred while accessing the Registry for the requested information
73Invalid domain name
74Invalid host name
75No primary/secondary WINS server defined
76Invalid file
77Invalid system path
78File copy failed
79Invalid security parameter
80Unable to configure TCP/IP service
81Unable to configure DHCP service
82Unable to renew DHCP lease
83Unable to release DHCP lease
84IP not enabled on adapter
85IPX not enabled on adapter
86Frame/network number bounds error
87Invalid frame type
88Invalid network number
89Duplicate network number
90Parameter out of bounds
91Access denied
92Out of memory
93Already exists
94Path, file or object not found
95Unable to notify service
96Unable to notify DNS service
97Interface not configurable
98Not all DHCP leases could be released/renewed
100DHCP not enabled on adapter
101..4294967295Other

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

ParameterTypeDirectionDescription
DNSDomainSuffixSearchOrderstring[]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

ValueLabelDescription
0Successful completion, no reboot required
1Successful completion, reboot required
64Method not supported on this platform
65Unknown failure
66Invalid subnet mask
67An error occurred while processing an Instance that was returned
68Invalid input parameter
69More than 5 gateways specifiedMore than five gateways specified.
70Invalid IP address
71Invalid gateway IP address
72An error occurred while accessing the Registry for the requested information
73Invalid domain name
74Invalid host name
75No primary/secondary WINS server definedNo primary or secondary WINS server defined.
76Invalid file
77Invalid system path
78File copy failed
79Invalid security parameter
80Unable to configure TCP/IP service
81Unable to configure DHCP service
82Unable to renew DHCP lease
83Unable to release DHCP lease
84IP not enabled on adapter
85IPX not enabled on adapter
86Frame/network number bounds errorFrame or network number bounds error.
87Invalid frame type
88Invalid network number
89Duplicate network number
90Parameter out of bounds
91Access denied
92Out of memory
93Already exists
94Path, file or object not foundPath, file, or object not found.
95Unable to notify service
96Unable to notify DNS service
97Interface not configurable
98Not all DHCP leases could be released/renewedNot all DHCP leases are released or renewed.
100DHCP not enabled on adapter
101..4294967295Other

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

ParameterTypeDirectionDescription
FullDNSRegistrationEnabledbooleanin

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.

DomainDNSRegistrationEnabledbooleanin

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

ValueLabelDescription
0Successful completion, no reboot required
1Successful completion, reboot required
64Method not supported on this platform
65Unknown failure
66Invalid subnet mask
67An error occurred while processing an Instance that was returned
68Invalid input parameter
69More than 5 gateways specifiedMore than five gateways specified.
70Invalid IP address
71Invalid gateway IP address
72An error occurred while accessing the Registry for the requested information
73Invalid domain name
74Invalid host name
75No primary/secondary WINS server definedNo primary or secondary WINS server defined.
76Invalid file
77Invalid system path
78File copy failed
79Invalid security parameter
80Unable to configure TCP/IP service
81Unable to configure DHCP service
82Unable to renew DHCP lease
83Unable to release DHCP lease
84IP not enabled on adapter
85IPX not enabled on adapter
86Frame/network number bounds errorFrame or network number bounds error.
87Invalid frame type
88Invalid network number
89Duplicate network number
90Parameter out of bounds
91Access denied
92Out of memory
93Already exists
94Path, file or object not foundPath, file, or object not found.
95Unable to notify service
96Unable to notify DNS service
97Interface not configurable
98Not all DHCP leases could be released/renewedNot all DHCP leases could be released or renewed.
100DHCP not enabled on adapter
101..4294967295Other

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

ParameterTypeDirectionDescription
ForwardBufferMemoryuint32in

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

ValueLabelDescription
0Successful completion, no reboot required
1Successful completion, reboot required
64Method not supported on this platform
65Unknown failure
66Invalid subnet mask
67An error occurred while processing an Instance that was returned
68Invalid input parameter
69More than 5 gateways specifiedMore than five gateways specified.
70Invalid IP address
71Invalid gateway IP address
72An error occurred while accessing the Registry for the requested information
73Invalid domain name
74Invalid host name
75No primary/secondary WINS server definedNo primary or secondary WINS server defined.
76Invalid file
77Invalid system path
78File copy failed
79Invalid security parameter
80Unable to configure TCP/IP service
81Unable to configure DHCP service
82Unable to renew DHCP lease
83Unable to release DHCP lease
84IP not enabled on adapter
85IPX not enabled on adapter
86Frame/network number bounds errorFrame or network number bounds error.
87Invalid frame type
88Invalid network number
89Duplicate network number
90Parameter out of bounds
91Access denied
92Out of memory
93Already exists
94Path, file or object not foundPath, file, or object not found.
95Unable to notify service
96Unable to notify DNS service
97Interface not configurable
98Not all DHCP leases could be released/renewedNot all DHCP leases could be released or renewed.
100DHCP not enabled on adapter
101..4294967295Other

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

ParameterTypeDirectionDescription
DefaultIPGatewaystring[]in

List of IP addresses to gateways where network packets are routed.

GatewayCostMetricuint16[]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

ValueLabelDescription
0Successful completion, no reboot required
1Successful completion, reboot required
64Method not supported on this platformMethod not supported when the NIC is in DHCP mode.
65Unknown failure
66Invalid subnet mask
67An error occurred while processing an Instance that was returned
68Invalid input parameter
69More than 5 gateways specified
70Invalid IP address
71Invalid gateway IP address
72An error occurred while accessing the Registry for the requested information
73Invalid domain name
74Invalid host name
75No primary/secondary WINS server defined
76Invalid file
77Invalid system path
78File copy failed
79Invalid security parameter
80Unable to configure TCP/IP service
81Unable to configure DHCP service
82Unable to renew DHCP lease
83Unable to release DHCP lease
84IP not enabled on adapter
85IPX not enabled on adapter
86Frame/network number bounds error
87Invalid frame type
88Invalid network number
89Duplicate network number
90Parameter out of bounds
91Access denied
92Out of memory
93Already exists
94Path, file or object not found
95Unable to notify service
96Unable to notify DNS service
97Interface not configurable
98Not all DHCP leases could be released/renewed
100DHCP not enabled on adapter
101..4294967295Other

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

ParameterTypeDirectionDescription
IGMPLeveluint8in

Return values

ValueLabelDescription
0Successful completion, no reboot required
1Successful completion, reboot required
64Method not supported on this platform
65Unknown failure
66Invalid subnet mask
67An error occurred while processing an Instance that was returned
68Invalid input parameter
69More than 5 gateways specifiedMore than five gateways specified.
70Invalid IP address
71Invalid gateway IP address
72An error occurred while accessing the Registry for the requested information
73Invalid domain name
74Invalid host name
75No primary/secondary WINS server definedNo primary or secondary WINS server defined.
76Invalid file
77Invalid system path
78File copy failed
79Invalid security parameter
80Unable to configure TCP/IP service
81Unable to configure DHCP service
82Unable to renew DHCP lease
83Unable to release DHCP lease
84IP not enabled on adapter
85IPX not enabled on adapter
86Frame/network number bounds errorFrame or network number bounds error.
87Invalid frame type
88Invalid network number
89Duplicate network number
90Parameter out of bounds
91Access denied
92Out of memory
93Already exists
94Path, file or object not foundPath, file, or object not found.
95Unable to notify service
96Unable to notify DNS service
97Interface not configurable
98Not all DHCP leases could be released/renewedNot all DHCP leases could be released or renewed.
100DHCP not enabled on adapter
101..4294967295Other

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

ParameterTypeDirectionDescription
IPConnectionMetricuint32in

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

ValueLabelDescription
0Successful completion, no reboot required
1Successful completion, reboot required
64Method not supported on this platform
65Unknown failure
66Invalid subnet mask
67An error occurred while processing an Instance that was returned
68Invalid input parameter
69More than 5 gateways specifiedMore than five gateways specified.
70Invalid IP address
71Invalid gateway IP address
72An error occurred while accessing the Registry for the requested information
73Invalid domain name
74Invalid host name
75No primary/secondary WINS server definedNo primary or secondary WINS server defined.
76Invalid file
77Invalid system path
78File copy failed
79Invalid security parameter
80Unable to configure TCP/IP service
81Unable to configure DHCP service
82Unable to renew DHCP lease
83Unable to release DHCP lease
84IP not enabled on adapter
85IPX not enabled on adapter
86Frame/network number bounds errorFrame or network number bounds error.
87Invalid frame type
88Invalid network number
89Duplicate network number
90Parameter out of bounds
91Access denied
92Out of memory
93Already exists
94Path, file or object not foundPath, file, or object not found.
95Unable to notify service
96Unable to notify DNS service
97Interface not configurable
98Not all DHCP leases could be released/renewedNot all DHCP leases could be released or renewed.
100DHCP not enabled on adapter
101..4294967295Other

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

ParameterTypeDirectionDescription
IPUseZeroBroadcastbooleanin

If true, IP zero broadcast is used. The default is false.

Return values

ValueLabelDescription
0Successful completion, no reboot required
1Successful completion, reboot required
64Method not supported on this platform
65Unknown failure
66Invalid subnet mask
67An error occurred while processing an Instance that was returned
68Invalid input parameter
69More than 5 gateways specifiedMore than five gateways specified.
70Invalid IP address
71Invalid gateway IP address
72An error occurred while accessing the Registry for the requested information
73Invalid domain name
74Invalid host name
75No primary/secondary WINS server definedNo primary or secondary WINS server defined.
76Invalid file
77Invalid system path
78File copy failed
79Invalid security parameter
80Unable to configure TCP/IP service
81Unable to configure DHCP service
82Unable to renew DHCP lease
83Unable to release DHCP lease
84IP not enabled on adapter
85IPX not enabled on adapter
86Frame/network number bounds errorFrame or network number bounds error.
87Invalid frame type
88Invalid network number
89Duplicate network number
90Parameter out of bounds
91Access denied
92Out of memory
93Already exists
94Path, file or object not foundPath, file, or object not found.
95Unable to notify service
96Unable to notify DNS service
97Interface not configurable
98Not all DHCP leases could be released/renewedNot all DHCP leases could be released or renewed.
100DHCP not enabled on adapter
101..4294967295Other

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

ParameterTypeDirectionDescription
IPXNetworkNumberstring[]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.

IPXFrameTypeuint32[]in

An integer array of frame type identifiers. The values in this array correspond to the elements in the *IPXNetworkNumber* parameter.

Return values

ValueLabelDescription
0Successful completion, no reboot required
1Successful completion, reboot required
64Method not supported on this platform
65Unknown failure
66Invalid subnet mask
67An error occurred while processing an Instance that was returned
68Invalid input parameter
69More than 5 gateways specified
70Invalid IP address
71Invalid gateway IP address
72An error occurred while accessing the Registry for the requested information
73Invalid domain name
74Invalid host name
75No primary/secondary WINS server defined
76Invalid file
77Invalid system path
78File copy failed
79Invalid security parameter
80Unable to configure TCP/IP service
81Unable to configure DHCP service
82Unable to renew DHCP lease
83Unable to release DHCP lease
84IP not enabled on adapter
85IPX not enabled on adapter
86Frame/network number bounds error
87Invalid frame type
88Invalid network number
89Duplicate network number
90Parameter out of bounds
91Access denied
92Out of memory
93Already exists
94Path, file or object not found
95Unable to notify service
96Unable to notify DNS service
97Interface not configurable
98Not all DHCP leases could be released/renewed
100DHCP not enabled on adapter
101–4294967295Other

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

ParameterTypeDirectionDescription
IPXVirtualNetNumberstringin

The virtual network number for this system.

Return values

ValueLabelDescription
0Successful completion, no reboot required
1Successful completion, reboot required
64Method not supported on this platform
65Unknown failure
66Invalid subnet mask
67An error occurred while processing an Instance that was returned
68Invalid input parameter
69More than 5 gateways specified
70Invalid IP address
71Invalid gateway IP address
72An error occurred while accessing the Registry for the requested information
73Invalid domain name
74Invalid host name
75No primary/secondary WINS server defined
76Invalid file
77Invalid system path
78File copy failed
79Invalid security parameter
80Unable to configure TCP/IP service
81Unable to configure DHCP service
82Unable to renew DHCP lease
83Unable to release DHCP lease
84IP not enabled on adapter
85IPX not enabled on adapter
86Frame/network number bounds error
87Invalid frame type
88Invalid network number
89Duplicate network number
90Parameter out of bounds
91Access denied
92Out of memory
93Already exists
94Path, file or object not found
95Unable to notify service
96Unable to notify DNS service
97Interface not configurable
98Not all DHCP leases could be released/renewed
100DHCP not enabled on adapter
101–4294967295Other

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

ParameterTypeDirectionDescription
KeepAliveIntervaluint32in

Value, in milliseconds, for the interval separating Keep Alive Retransmissions until a response is received.

Return values

ValueLabelDescription
0Successful completion, no reboot required
1Successful completion, reboot required
64Method not supported on this platform
65Unknown failure
66Invalid subnet mask
67An error occurred while processing an Instance that was returned
68Invalid input parameter
69More than 5 gateways specifiedMore than five gateways specified.
70Invalid IP address
71Invalid gateway IP address
72An error occurred while accessing the Registry for the requested information
73Invalid domain name
74Invalid host name
75No primary/secondary WINS server definedNo primary or secondary WINS server defined.
76Invalid file
77Invalid system path
78File copy failed
79Invalid security parameter
80Unable to configure TCP/IP service
81Unable to configure DHCP service
82Unable to renew DHCP lease
83Unable to release DHCP lease
84IP not enabled on adapter
85IPX not enabled on adapter
86Frame/network number bounds errorFrame or network number bounds error.
87Invalid frame type
88Invalid network number
89Duplicate network number
90Parameter out of bounds
91Access denied
92Out of memory
93Already exists
94Path, file or object not foundPath, file, or object not found.
95Unable to notify service
96Unable to notify DNS service
97Interface not configurable
98Not all DHCP leases could be released/renewedNot all DHCP leases could be released or renewed.
100DHCP not enabled on adapter
101..4294967295Other

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

ParameterTypeDirectionDescription
KeepAliveTimeuint32in

Interval, in milliseconds, the TCP waits to check that an idle connection is still available.

Return values

ValueLabelDescription
0Successful completion, no reboot required
1Successful completion, reboot required
64Method not supported on this platform
65Unknown failure
66Invalid subnet mask
67An error occurred while processing an Instance that was returned
68Invalid input parameter
69More than 5 gateways specifiedMore than five gateways specified.
70Invalid IP address
71Invalid gateway IP address
72An error occurred while accessing the Registry for the requested information
73Invalid domain name
74Invalid host name
75No primary/secondary WINS server definedNo primary or secondary WINS server defined.
76Invalid file
77Invalid system path
78File copy failed
79Invalid security parameter
80Unable to configure TCP/IP service
81Unable to configure DHCP service
82Unable to renew DHCP lease
83Unable to release DHCP lease
84IP not enabled on adapter
85IPX not enabled on adapter
86Frame/network number bounds errorFrame or network number bounds error.
87Invalid frame type
88Invalid network number
89Duplicate network number
90Parameter out of bounds
91Access denied
92Out of memory
93Already exists
94Path, file or object not foundPath, file, or object not found.
95Unable to notify service
96Unable to notify DNS service
97Interface not configurable
98Not all DHCP leases could be released/renewedNot all DHCP leases could be released or renewed.
100DHCP not enabled on adapter
101..4294967295Other

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

ParameterTypeDirectionDescription
MTUuint32in

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

ValueLabelDescription
0Successful completion, no reboot requiredSuccessful completion. No reboot is required.
1Successful completion, reboot requiredSuccessful completion. Reboot is required.
64Method not supported on this platform
65Unknown failure
66Invalid subnet mask
67An error occurred while processing an Instance that was returned
68Invalid input parameter
69More than 5 gateways specifiedMore than five gateways specified.
70Invalid IP address
71Invalid gateway IP address
72An error occurred while accessing the Registry for the requested information
73Invalid domain name
74Invalid host name
75No primary/secondary WINS server definedNo primary or secondary WINS server defined.
76Invalid file
77Invalid system path
78File copy failed
79Invalid security parameter
80Unable to configure TCP/IP service
81Unable to configure DHCP service
82Unable to renew DHCP lease
83Unable to release DHCP lease
84IP not enabled on adapter
85IPX not enabled on adapter
86Frame/network number bounds errorFrame or network number bounds error.
87Invalid frame type
88Invalid network number
89Duplicate network number
90Parameter out of bounds
91Access denied
92Out of memory
93Already exists
94Path, file or object not foundPath, file, or object not found.
95Unable to notify service
96Unable to notify DNS service
97Interface not configurable
98Not all DHCP leases could be released/renewedNot all DHCP leases can be released or renewed.
100DHCP not enabled on adapterDHCP is not enabled on adapter.
101..4294967295Other

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

ParameterTypeDirectionDescription
NumForwardPacketsuint32in

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

ValueLabelDescription
0Successful completion, no reboot required
1Successful completion, reboot required
64Method not supported on this platform
65Unknown failure
66Invalid subnet mask
67An error occurred while processing an Instance that was returned
68Invalid input parameter
69More than 5 gateways specifiedMore than five gateways specified.
70Invalid IP address
71Invalid gateway IP address
72An error occurred while accessing the Registry for the requested information
73Invalid domain name
74Invalid host name
75No primary/secondary WINS server definedNo primary or secondary WINS server defined.
76Invalid file
77Invalid system path
78File copy failed
79Invalid security parameter
80Unable to configure TCP/IP service
81Unable to configure DHCP service
82Unable to renew DHCP lease
83Unable to release DHCP lease
84IP not enabled on adapter
85IPX not enabled on adapter
86Frame/network number bounds errorFrame or network number bounds error.
87Invalid frame type
88Invalid network number
89Duplicate network number
90Parameter out of bounds
91Access denied
92Out of memory
93Already exists
94Path, file or object not foundPath, file, or object not found.
95Unable to notify service
96Unable to notify DNS service
97Interface not configurable
98Not all DHCP leases could be released/renewedNot all DHCP leases could be released or renewed.
100DHCP not enabled on adapter
101..4294967295Other

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

ParameterTypeDirectionDescription
PMTUBHDetectEnabledbooleanin

If true, TCP attempts to discover Black Hole and route packets in different network paths.

Return values

ValueLabelDescription
0Successful completion, no reboot required
1Successful completion, reboot required
64Method not supported on this platform
65Unknown failure
66Invalid subnet mask
67An error occurred while processing an Instance that was returned
68Invalid input parameter
69More than 5 gateways specifiedMore than five gateways specified.
70Invalid IP address
71Invalid gateway IP address
72An error occurred while accessing the Registry for the requested information
73Invalid domain name
74Invalid host name
75No primary/secondary WINS server definedNo primary or secondary WINS server defined.
76Invalid file
77Invalid system path
78File copy failed
79Invalid security parameter
80Unable to configure TCP/IP service
81Unable to configure DHCP service
82Unable to renew DHCP lease
83Unable to release DHCP lease
84IP not enabled on adapter
85IPX not enabled on adapter
86Frame/network number bounds errorFrame or network number bounds error.
87Invalid frame type
88Invalid network number
89Duplicate network number
90Parameter out of bounds
91Access denied
92Out of memory
93Already exists
94Path, file or object not foundPath, file, or object not found.
95Unable to notify service
96Unable to notify DNS service
97Interface not configurable
98Not all DHCP leases could be released/renewedNot all DHCP leases could be released or renewed.
100DHCP not enabled on adapter
101..4294967295Other

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

ParameterTypeDirectionDescription
PMTUDiscoveryEnabledbooleanin

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

ValueLabelDescription
0Successful completion, no reboot required
1Successful completion, reboot required
64Method not supported on this platform
65Unknown failure
66Invalid subnet mask
67An error occurred while processing an Instance that was returned
68Invalid input parameter
69More than 5 gateways specifiedMore than five gateways specified.
70Invalid IP address
71Invalid gateway IP address
72An error occurred while accessing the Registry for the requested information
73Invalid domain name
74Invalid host name
75No primary/secondary WINS server definedNo primary or secondary WINS server defined.
76Invalid file
77Invalid system path
78File copy failed
79Invalid security parameter
80Unable to configure TCP/IP service
81Unable to configure DHCP service
82Unable to renew DHCP lease
83Unable to release DHCP lease
84IP not enabled on adapter
85IPX not enabled on adapter
86Frame/network number bounds errorFrame or network number bounds error.
87Invalid frame type
88Invalid network number
89Duplicate network number
90Parameter out of bounds
91Access denied
92Out of memory
93Already exists
94Path, file or object not foundPath, file, or object not found.
95Unable to notify service
96Unable to notify DNS service
97Interface not configurable
98Not all DHCP leases could be released/renewedNot all DHCP leases could be released or renewed.
100DHCP not enabled on adapter
101..4294967295Other

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

ParameterTypeDirectionDescription
TcpipNetbiosOptionsuint32in

Value that specifies the possible settings related to NetBIOS over TCP/IP.

Return values

ValueLabelDescription
0Successful completion, no reboot requiredSuccessful completion. No reboot required.
1Successful completion, reboot requiredSuccessful completion. Reboot required.
64Method not supported on this platform
65Unknown failure
66Invalid subnet mask
67An error occurred while processing an Instance that was returned
68Invalid input parameter
69More than 5 gateways specifiedMore than five gateways specified.
70Invalid IP address
71Invalid gateway IP address
72An error occurred while accessing the Registry for the requested information
73Invalid domain name
74Invalid host name
75No primary/secondary WINS server definedNo primary or secondary WINS server defined.
76Invalid file
77Invalid system path
78File copy failed
79Invalid security parameter
80Unable to configure TCP/IP service
81Unable to configure DHCP service
82Unable to renew DHCP lease
83Unable to release DHCP lease
84IP not enabled on adapter
85IPX not enabled on adapter
86Frame/network number bounds errorFrame or network number bounds error.
87Invalid frame type
88Invalid network number
89Duplicate network number
90Parameter out of bounds
91Access denied
92Out of memory
93Already exists
94Path, file or object not foundPath, file, or object not found.
95Unable to notify service
96Unable to notify DNS service
97Interface not configurable
98Not all DHCP leases could be released/renewedNot all DHCP leases can be released or renewed.
100DHCP not enabled on adapter
101..4294967295Other

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

ParameterTypeDirectionDescription
TcpMaxConnectRetransmissionsuint32in

Number of attempts TCP will retransmit a connect request before aborting. The valid range for values is 0 - 0xFFFFFFFF.

Return values

ValueLabelDescription
0Successful completion, no reboot required
1Successful completion, reboot required
64Method not supported on this platform
65Unknown failure
66Invalid subnet mask
67An error occurred while processing an Instance that was returned
68Invalid input parameter
69More than 5 gateways specifiedMore than five gateways specified.
70Invalid IP address
71Invalid gateway IP address
72An error occurred while accessing the Registry for the requested information
73Invalid domain name
74Invalid host name
75No primary/secondary WINS server definedNo primary or secondary WINS server defined.
76Invalid file
77Invalid system path
78File copy failed
79Invalid security parameter
80Unable to configure TCP/IP service
81Unable to configure DHCP service
82Unable to renew DHCP lease
83Unable to release DHCP lease
84IP not enabled on adapter
85IPX not enabled on adapter
86Frame/network number bounds errorFrame or network number bounds error.
87Invalid frame type
88Invalid network number
89Duplicate network number
90Parameter out of bounds
91Access denied
92Out of memory
93Already exists
94Path, file or object not foundPath, file, or object not found.
95Unable to notify service
96Unable to notify DNS service
97Interface not configurable
98Not all DHCP leases could be released/renewedNot all DHCP leases could be released or renewed.
100DHCP not enabled on adapter
101..4294967295Other

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

ParameterTypeDirectionDescription
TcpMaxDataRetransmissionsuint32in

Number of times TCP retransmits an individual data segment before aborting the connection. Valid range: 0 - 0xFFFFFFFF.

Return values

ValueLabelDescription
0Successful completion, no reboot required
1Successful completion, reboot required
64Method not supported on this platform
65Unknown failure
66Invalid subnet mask
67An error occurred while processing an Instance that was returned
68Invalid input parameter
69More than 5 gateways specifiedMore than five gateways specified.
70Invalid IP address
71Invalid gateway IP address
72An error occurred while accessing the Registry for the requested information
73Invalid domain name
74Invalid host name
75No primary/secondary WINS server definedNo primary or secondary WINS server defined.
76Invalid file
77Invalid system path
78File copy failed
79Invalid security parameter
80Unable to configure TCP/IP service
81Unable to configure DHCP service
82Unable to renew DHCP lease
83Unable to release DHCP lease
84IP not enabled on adapter
85IPX not enabled on adapter
86Frame/network number bounds errorFrame or network number bounds error.
87Invalid frame type
88Invalid network number
89Duplicate network number
90Parameter out of bounds
91Access denied
92Out of memory
93Already exists
94Path, file or object not foundPath, file, or object not found.
95Unable to notify service
96Unable to notify DNS service
97Interface not configurable
98Not all DHCP leases could be released/renewedNot all DHCP leases could be released or renewed.
100DHCP not enabled on adapter
101..4294967295Other

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

ParameterTypeDirectionDescription
TcpNumConnectionsuint32in

Maximum number of connections that TCP may have open simultaneously. The valid range of values is 0 - 0xFFFFFE.

Return values

ValueLabelDescription
0Successful completion, no reboot required
1Successful completion, reboot required
64Method not supported on this platform
65Unknown failure
66Invalid subnet mask
67An error occurred while processing an Instance that was returned
68Invalid input parameter
69More than 5 gateways specifiedMore than five gateways specified.
70Invalid IP address
71Invalid gateway IP address
72An error occurred while accessing the Registry for the requested information
73Invalid domain name
74Invalid host name
75No primary/secondary WINS server definedNo primary or secondary WINS server defined.
76Invalid file
77Invalid system path
78File copy failed
79Invalid security parameter
80Unable to configure TCP/IP service
81Unable to configure DHCP service
82Unable to renew DHCP lease
83Unable to release DHCP lease
84IP not enabled on adapter
85IPX not enabled on adapter
86Frame/network number bounds errorFrame or network number bounds error.
87Invalid frame type
88Invalid network number
89Duplicate network number
90Parameter out of bounds
91Access denied
92Out of memory
93Already exists
94Path, file or object not foundPath, file, or object not found.
95Unable to notify service
96Unable to notify DNS service
97Interface not configurable
98Not all DHCP leases could be released/renewedNot all DHCP leases could be released or renewed.
100DHCP not enabled on adapter
101..4294967295Other

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

ParameterTypeDirectionDescription
TcpUseRFC1122UrgentPointerbooleanin

If true, TCP uses the RFC 1122 specification. If false, urgent data is sent in the mode used by BSD-derived systems.

Return values

ValueLabelDescription
0Successful completion, no reboot required
1Successful completion, reboot required
64Method not supported on this platform
65Unknown failure
66Invalid subnet mask
67An error occurred while processing an Instance that was returned
68Invalid input parameter
69More than 5 gateways specifiedMore than five gateways specified.
70Invalid IP address
71Invalid gateway IP address
72An error occurred while accessing the Registry for the requested information
73Invalid domain name
74Invalid host name
75No primary/secondary WINS server definedNo primary or secondary WINS server defined.
76Invalid file
77Invalid system path
78File copy failed
79Invalid security parameter
80Unable to configure TCP/IP service
81Unable to configure DHCP service
82Unable to renew DHCP lease
83Unable to release DHCP lease
84IP not enabled on adapter
85IPX not enabled on adapter
86Frame/network number bounds errorFrame or network number bounds error.
87Invalid frame type
88Invalid network number
89Duplicate network number
90Parameter out of bounds
91Access denied
92Out of memory
93Already exists
94Path, file or object not foundPath, file, or object not found.
95Unable to notify service
96Unable to notify DNS service
97Interface not configurable
98Not all DHCP leases could be released/renewedNot all DHCP leases could be released or renewed.
100DHCP not enabled on adapter
101..4294967295Other

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

ParameterTypeDirectionDescription
TcpWindowSizeuint16in

Maximum TCP receive window size offered by the system. The valid range of values in bytes is 0 - 65535.

Return values

ValueLabelDescription
0Successful completion, no reboot required
1Successful completion, reboot required
64Method not supported on this platform
65Unknown failure
66Invalid subnet mask
67An error occurred while processing an Instance that was returned
68Invalid input parameter
69More than 5 gateways specifiedMore than five gateways specified.
70Invalid IP address
71Invalid gateway IP address
72An error occurred while accessing the Registry for the requested information
73Invalid domain name
74Invalid host name
75No primary/secondary WINS server definedNo primary or secondary WINS server defined.
76Invalid file
77Invalid system path
78File copy failed
79Invalid security parameter
80Unable to configure TCP/IP service
81Unable to configure DHCP service
82Unable to renew DHCP lease
83Unable to release DHCP lease
84IP not enabled on adapter
85IPX not enabled on adapter
86Frame/network number bounds errorFrame or network number bounds error.
87Invalid frame type
88Invalid network number
89Duplicate network number
90Parameter out of bounds
91Access denied
92Out of memory
93Already exists
94Path, file or object not foundPath, file, or object not found.
95Unable to notify service
96Unable to notify DNS service
97Interface not configurable
98Not all DHCP leases could be released/renewedNot all DHCP leases could be released or renewed.
100DHCP not enabled on adapter
101..4294967295Other

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

ParameterTypeDirectionDescription
WINSPrimaryServerstringin

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.

WINSSecondaryServerstringin

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

ValueLabelDescription
0Successful completion, no reboot required
1Successful completion, reboot required
64Method not supported on this platform
65Unknown failure
66Invalid subnet mask
67An error occurred while processing an Instance that was returned
68Invalid input parameter
69More than 5 gateways specifiedMore than five gateways specified.
70Invalid IP address
71Invalid gateway IP address
72An error occurred while accessing the Registry for the requested information
73Invalid domain name
74Invalid host name
75No primary/secondary WINS server definedNo primary or secondary WINS server defined.
76Invalid file
77Invalid system path
78File copy failed
79Invalid security parameter
80Unable to configure TCP/IP service
81Unable to configure DHCP service
82Unable to renew DHCP lease
83Unable to release DHCP lease
84IP not enabled on adapter
85IPX not enabled on adapter
86Frame/network number bounds errorFrame or network number bounds error.
87Invalid frame type
88Invalid network number
89Duplicate network number
90Parameter out of bounds
91Access denied
92Out of memory
93Already exists
94Path, file or object not foundPath, file, or object not found.
95Unable to notify service
96Unable to notify DNS service
97Interface not configurable
98Not all DHCP leases could be released/renewedNot all DHCP leases could be released or renewed.
100DHCP not enabled on adapter
101..4294967295Other

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

  1. CIM_Setting
  2. 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

Source: Microsoft Learn

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.