If it just _has_ to be the command line.
Intel’s track record with Windows 10 drivers for their network chips is … well, “spotty” might be the word. For some as yet unexplained reason, after a new “functional update” comes out, it always takes Intel months to get a driver release out that will support ANS (Teaming and VLANs) on that Windows version.
Recently they also have removed the GUI for configuring the more advanced features, such as creating VLAN interfaces (it was called “PROset for Device Manager” or something), so now that has to be done in PowerShell. That wouldn’t be so bad, if there was not also another bug somewhere: As long as any ANS VLAN interfaces exist, the basic “*-NetAdapter” cmdlets do not work anymore; they complain about an “invalid parameter” in some WMI operation. Remove all the VLANs, and it works again as if nothing had happened.
In the early announcement for the latest driver release 24.1, Intel said that “[t]he Team and VLAN configuration issues are expected to be resolved in the next SW Release available in early Q2 (April/May)". At least I assume that refers to 24.1, because that is also the first release to support VLANs on 1903 at all, and the above is part of Intel’s standard response to forum questions about VLANs on 1903.
No such luck (or it was not meant to refer to the WMI issue). Still the exact same error.
This is a problem for those who want to rename their interfaces from
“Ethernet 1” etc. because Rename-NetAdapter
is also affected.
However, there is a workaround using an older (I think) version of the
WMI classes. The more recent root\StandardCIMv2\MSFT_NetAdapter
class is used by the *-NetAdapter*
cmdlets and transitively breaks
them all, but the good old Win32_NetworkAdapter
class is still
around and still works.
To change the interface alias (=name) of a network connection, you can still use both PowerShell
Get-CimInstance -Namespace root\cimv2 `
-ClassName Win32_NetworkAdapter `
-Filter "DeviceID=6" `
| Set-CimInstance -Property @{NetConnectionID="MIRRORING"}
and WMIC
/interactive:off NIC where DeviceID=6 set NetConnectionID="MIRRORING"
. Without the switch in front there will be a confirmation prompt.
You can get the DeviceID
from either
nic get DeviceID,Name,NetConnectionID
or
Get-CimInstance -Namespace root\cimv2 -ClassName Win32_NetworkAdapter `
| Select-Object DeviceID,Name,NetConnectionID
The output is identical, except that wmic
does not underline column
headers.
Or you can use netsh
, if you don’t care about the
deprecation warnings.
netsh interface set interface name="Ethernet 1" newname="MIRRORING"