list network adapters of given type

YaroC 311 Reputation points
2021-10-22T09:02:02.903+00:00

I'm trying to count how many NICs of a different type are installed in servers I'm overlooking (mostly 2012R2 and 2016). I tried using both get-netadapter and gwmi win32_networkadapter class but neither will present adapters which are teamed and so giving incorrect count. Is the any other method to list all installed NICs disregarding teaming?

Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,383 questions
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Rich Matheisen 45,096 Reputation points
    2021-10-22T19:08:41.62+00:00

    If WMI can't do it then maybe Get-NetLbfoTeam, Get-NetLbfoTeamNic, and Get-NetLbfoTeamMember (or a combination those cmdlets) can? Combine the results with Get-NetAdaptor and you may be able to get the number of NICs.


  2. YaroC 311 Reputation points
    2021-10-26T08:21:08.707+00:00

    Nope, it still lists teamed adapters as a single adapter of custom name without any reference actual physical adapters.
    It get's even more interesting. I was trying to simply get the network mask of the teamed adapter and I can't seem to find a commandlet that will get me that. I can get IP address, gateway , even DNS servers yet network mask is just not listed anywhere other than by running ipconfig.


  3. YaroC 311 Reputation points
    2021-10-26T17:18:45.823+00:00

    Yes, I was wondering the same. All NICs are visible in Device Manager and Network and Sharing Center yet when they're teamed it seems the system doesn't recognize them as individual adapters anymore.