Network Link Speed

The root\wmi Namespace contains a class that just returns the link speed of your network card. Quick and easy to use function.

function get-linkspeed{            
param(            
 [string]$computer="."            
)            
Get-WmiObject -Namespace root\wmi -Class MSNdis_LinkSpeed `
-ComputerName $computer |             
select InstanceName, @{N="Speed(Mbps)"; E={$_.NdisLinkSpeed/10000}}            
            
}

The documentation I could find suggested that the NdisLinkSpeed property returned Kbps but that gave some odd results. Experimentation and a bit more research suggested I needed to divide by 10000.

Published Wed, Aug 24 2011 21:13 by RichardSiddaway

Leave a Comment

(required) 
(required) 
(optional)
(required) 
If you can't read this number refresh your screen
Enter the numbers above: