header
header Register : : Login header
header
divider
menuleft
menuright
submenu
left

We have a new sponsor!  Introducting Pragma Systems.  See the home page for details.

Get NIC Info
Last Post 14 Nov 2008 07:40 PM by edm365f31. 4 Replies.
Printer Friendly
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
aalborzUser is Offline
New Member
New Member
Posts:61
Avatar

--
31 Oct 2008 03:26 PM  

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

 

ShayUser is Online
Veteran Member
Veteran Member
Posts:1136
Avatar

--
01 Nov 2008 02:31 PM  
What do you get if you run:

PS > get-wmiObject Win32_NetworkAdapter


Shay Levy
Windows PowerShell MVP
http://blogs.microsoft.co.il/blogs/ScriptFanatic
PowerShell Community Toolbar
Twitter: @ShayLevy
aalborzUser is Offline
New Member
New Member
Posts:61
Avatar

--
03 Nov 2008 08: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!

 

ShayUser is Online
Veteran Member
Veteran Member
Posts:1136
Avatar

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

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

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

Shay Levy
Windows PowerShell MVP
http://blogs.microsoft.co.il/blogs/ScriptFanatic
PowerShell Community Toolbar
Twitter: @ShayLevy
edm365f31User is Offline
New Member
New Member
Posts:98
Avatar

--
14 Nov 2008 07:40 PM  
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.1
right
   
footer Sponsored by Quest Software • SAPIEN Technologies • Compellent • Microsoft Windows Server 2008 footer
footer