header1   header
header
header Register : : Login header
header
connector   connector
menuleft menuright
submenu   submenu
left
Get NIC Info
Last Post 14 Nov 2008 11:40 AM by edm365f31. 4 Replies.
Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
Alex AlborzfardUser is Offline
New Member
New Member
Posts:61
Avatar

--
31 Oct 2008 07:26 AM

    I want to get NIC info on a whole bunch of servers. Mainly what I'm interested in is speed (1GB, 100MB,etc.), and may be manufacturer & model.

    I ran a script on my local machine using get-wmiObject Win32_NetworkAdapter, but I got this error:

    Cannot process argument because the value of argument "obj" is null. Change the value of argument "obj" to a non-null value.

    What am I doing wrong and more importantly how can I accomplish this?

    TIA

     

    Shay LevyUser is Offline
    PowerShell MVP, Admin
    Veteran Member
    Veteran Member
    Posts:1362
    Avatar

    --
    01 Nov 2008 06:31 AM
    What do you get if you run:

    PS > get-wmiObject Win32_NetworkAdapter


    Shay Levy
    Windows PowerShell MVP
    http://PowerShay.com
    PowerShell Community Toolbar
    Twitter: @ShayLevy
    Alex AlborzfardUser is Offline
    New Member
    New Member
    Posts:61
    Avatar

    --
    03 Nov 2008 12:03 PM

    That lists the NICs' name, MAC address, etc. among other things, but not its bandwidth/speed.

    I found out that the command to get that information is:

    Get-wmiObject -class Win32_PerfFormattedData_Tcpip_NetworkInterface

    Thx for your reply!

     

    Shay LevyUser is Offline
    PowerShell MVP, Admin
    Veteran Member
    Veteran Member
    Posts:1362
    Avatar

    --
    04 Nov 2008 12:00 AM
    Try these:

    PS > [System.Net.NetworkInformation.NetworkInterface]::GetAllNetworkInterfaces()

    PS > [System.Net.NetworkInformation.NetworkInterface]::GetAllNetworkInterfaces() | foreach {$_.GetIPv4Statistics()}

    Shay Levy
    Windows PowerShell MVP
    http://PowerShay.com
    PowerShell Community Toolbar
    Twitter: @ShayLevy
    edm365f31User is Offline
    Basic Member
    Basic Member
    Posts:100
    Avatar

    --
    14 Nov 2008 11:40 AM
    How do your get currentbandwidth on remote machine by using [System.Net.NetworkInformation.NetworkInterface]::GetAllNetworkInterfaces()
    Also if you are only trying to get the speed of those boxes that has IP enabled.
    Thnx
    Ed
    You are not authorized to post a reply.


    Active Forums 4.3
    right
    footer   footer
    footer Sponsored by Quest Software • SAPIEN Technologies • Compellent • Microsoft Windows Server 2008 R2 footer
    footer   footer