Powershell NIC Command Problem

Notice: Page may contain affiliate links for which we may earn a small commission through services like Amazon Affiliates or Skimlinks.

zkrr01

Member
Jun 28, 2018
106
6
18
I am getting an error on a powershell NIC related command that is driving me nuts, what am I doing wrong.
Code:
PS C:\work> Get-NetAdapter | sort InterfaceDescription

Name                      InterfaceDescription                    ifIndex Status       MacAddress             LinkSpeed
----                      --------------------                    ------- ------       ----------             ---------
Ethernet 2                Microsoft Hyper-V Network Adapter #2         11 Up           00-15-5D-01-01-05         1 Gbps
Ethernet 3                Microsoft Hyper-V Network Adapter #3          6 Up           00-15-5D-01-01-06        40 Gbps

PS C:\work> Enable-NetAdapterQoS -Name 'Ethernet 3'

Enable-NetAdapterQoS : No MSFT_NetAdapterQosSettingData objects found with property 'Name' equal to 'Ethernet 3'.
Verify the value of the property and retry.
At line:1 char:1
+ Enable-NetAdapterQoS -Name 'Ethernet 3'
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Ethernet 3:String) [Enable-NetAdapterQos], CimJobException
    + FullyQualifiedErrorId : CmdletizationQuery_NotFound_Name,Enable-NetAdapterQos
 

zkrr01

Member
Jun 28, 2018
106
6
18
It gives basically the same error -> property Name equal to "Ethernet 3"
For some reason it does not like the name "Ethernet 3" even though it comes from the Get-NetAdapter | sort InterfaceDescription
 

cesmith9999

Well-Known Member
Mar 26, 2013
1,417
468
83
do you have any QOS settings created?

look at the RDMA guides (even of you are not using RDMA) for help.

Chris
 

zkrr01

Member
Jun 28, 2018
106
6
18
RDMA is what I am trying to setup, and yes QOS is part of that. But I cannot continue until I can get past the "Ethernet 3" issue because there are several commands that depend on that. I must say even though I am a windows bigot, the Linux setup of RDMA is much clearer and easier to setup.
 

zkrr01

Member
Jun 28, 2018
106
6
18
Looks like a better article then I was using, but after about 5 commands came one of the commands that is causing my problem:
Enable-NetAdapterQos -Name "Ethernet 3"
It appears that Microsoft does not know how to handle a NIC name of "Ethernet 3" yet it was Microsoft that gave it that name.
 

zkrr01

Member
Jun 28, 2018
106
6
18
Powershell must be brain dead! Now I get:

Code:
PS C:\work> Rename-NetAdapter -Name "Ethernet 3" -NewName Ethernet3


PS C:\work> Enable-NetAdapterQos -Name "Ethernet3"
Enable-NetAdapterQos : No MSFT_NetAdapterQosSettingData objects found with property 'Name'
equal to 'Ethernet3'.  Verify the value of the property and retry.
At line:1 char:1
+ Enable-NetAdapterQos -Name "Ethernet3"
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Ethernet3:String) [Enable-NetAdapterQos], CimJob
   Exception
    + FullyQualifiedErrorId : CmdletizationQuery_NotFound_Name,Enable-NetAdapterQos

PS C:\work> Enable-NetAdapterQos -Name Ethernet3
Enable-NetAdapterQos : No MSFT_NetAdapterQosSettingData objects found with property 'Name'
equal to 'Ethernet3'.  Verify the value of the property and retry.
At line:1 char:1
+ Enable-NetAdapterQos -Name Ethernet3
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Ethernet3:String) [Enable-NetAdapterQos], CimJob
   Exception
    + FullyQualifiedErrorId : CmdletizationQuery_NotFound_Name,Enable-NetAdapterQos
 

zkrr01

Member
Jun 28, 2018
106
6
18
Just in case I followed up to make sure the rename worked:
Code:
PS C:\work> Get-NetAdapterRdma

Name                      InterfaceDescription                     Enabled     PFC        ETS
----                      --------------------                     -------     ---        ---
Ethernet 2                Microsoft Hyper-V Network Adapter #2     False       NA         NA
Ethernet3                 Microsoft Hyper-V Network Adapter #3     True        NA         NA
 

weust

Active Member
Aug 15, 2014
353
44
28
44
There is something really wrong with the *-NetAdapterQos CmdLets.
Even doing a "Get-NetAdapter -Name '<name>' | Get-NetAdapterQos" returns this error.
 

zkrr01

Member
Jun 28, 2018
106
6
18
You are right. You would think something as simple as 10 or commands to implement RDMA on Windows would be simple, but Microsoft acts like it is the most complex activity in the whole world!
 

weust

Active Member
Aug 15, 2014
353
44
28
44
The RDMA part in the cmdlet is probably just fine, the -Name option is b0rked.
Copy/paste between the cmdlets, no doubt.
 

zkrr01

Member
Jun 28, 2018
106
6
18
It looks like more than the -Name option is broken. Is there any way to get RDMA working without powershell?
 

zane

Member
Aug 22, 2013
70
0
6
If you have an issue with a module forcing updates with "Update-Module -Force" may have a slim chance of correcting an issue.

Dont know if this would work but you can try using one of these options instead of -name with enable-netadapterqos
-InterfaceAlias
-InterfaceDescription

try to enable all adapters that allow it with:
This command gets all network adapters that support QoS, enables QoS on all of them, and restarts the network adapter.
$NetAdapter1 = Get-NetAdapterQos -Name "*" PS C:\> Enable-NetAdapterQos -InputObject $NetAdapter1
This command is a version of the cmdlet that gets all network adapters that support QoS and enables QoS on all of them via the pipeline, then restarts the network adapter.
Get-NetAdapterQos -Name "*" | Enable-NetAdapterQos

This is what I've used in the past to rename my NICs.
#get the names
Get-NetAdapter | ft name

$NewName = "NEW NIC NAME"
$renameNIC= (Get-NetAdapter -name "YOUR CURRENT NIC NAME" | Rename-NetAdapter -$NewName)
 
Last edited:

zkrr01

Member
Jun 28, 2018
106
6
18
I gave up getting RDMA working on Windows. Much easier and cheaper just to dual boot CentOS-7.