Get detailed network adapter information using PowerShell

5,785

Solution 1

This will not work for everyone, but I found that my specific NIC came with a provider for powershell. The namespace I could use was

    root\IntelNCS2

Intel provides a scripting reference for using the WMI objects that are provided, and gives a brief description of each, in this PDF.

Basically, to get RSS information for a NIC, you need to get the IANet_AdapterSettings WMI object, and look at the "Receive Side Scaling" or "Receive Side Scaling Queues".

    Get-WmiObject -Namespace "root\IntelNCS2" -Class IANet_AdapterSetting | Where-Object {$_.description -eq "Receive Side Scaling"}
    Get-WmiObject -Namespace "root\IntelNCS2" -Class IANet_AdapterSetting | Where-Object {$_.description -eq "Receive Side Scaling Queues"}

Once you get this information, you can handle it any way you want. Don't forget you can pipe the output into Get-Member to find methods/properties available for the object.

Solution 2

Unfortunately there is no easy way to get this as of Win 2008 - you will have to trawl the Registry for it, unless, like EGr, you have vendor drivers that were nice enough to come with a provider for it.

In Windows 8 and Server 2012, you will have the MSFT_NetAdapterRssSettingData WMI class, which is what you want. But it's not in Windows 2008.

What I mean by trawl the registry is check this key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class{4D36E972-E325-11CE-BFC1-08002BE10318}\0007

RSS: 1

Still scriptable, just not as simple as a single Powershell cmdlet.

Share:
5,785
EGr
Author by

EGr

Updated on September 18, 2022

Comments

  • EGr
    EGr over 1 year

    Is there an alternative to Get-NetAdapterRss that can be used on Windows Server 08/03/etc.? I'm looking to query NIC information from servers with a powershell script, but cannot seem to find how to obtain RSS status/information. Is there a way to do this using WMI instead? I believe the box that the servers are using Intel NICs (if that makes a difference).

    • EGr
      EGr over 11 years
      @joeqwerty Powershell doesn't show any output for that command; but cmd.exe does.
    • EGr
      EGr over 11 years
      Ah, okay. Well I was able to pipe a Win32_NetworkAdapter object into netsh from powershell, and I got output. The only problem is that it doesn't give a boolean value, the whole table is a string (I think)
  • EGr
    EGr over 11 years
    Out of curiosity, do you know an easy way to find registry keys that have this kind of information? I haven't had to edit/view the registry in my previous jobs, but I just started my current one as a sysadmin. Knowing this information would probably be very beneficial to me, so I would appreaciate any guidance you could provide.
  • Ryan Ries
    Ryan Ries over 11 years
    Well, a "list of useful registry keys" is a very nebulous area and an entire book could probably be written about it. But how I found that particular registry key was I went to Device Manager, and looked at the "Device class guid" for one of my network cards.