How to detect the speed (fast or gigabit ethernet) of a network connection over Windows command line

Try this WMI query:

wmic NIC where NetEnabled=true get Name,Speed

That should give you the speed of all active network connections.

Edit: as has been pointed out, this query has to be modified to work in PowerShell (it works fine in cmd.exe though). Then again, in PowerShell you don't need to use WMI at all:

Get-NetAdapter | where Status -eq "Up" | select InterfaceDescription, LinkSpeed

As a bonus, this gives the speed in a nice, human-readable format (e.g. "1 Gbps"), rather than the number of bits per second.


From Indrek's answer:

wmic NIC where NetEnabled=true get Name, Speed

will work in the Command Prompt. For PowerShell use:

wmic NIC where "NetEnabled='true'" get "Name,Speed"

(The where clause, and any get attribute (like Name and Speed), must be enclosed in double quotes and comma-delimited).

// Edit #1: GET expression Name,Speed has to be enclosed within a single set of double quotes. Get expressions may not have a space between them


I would like to contribute to your share. If you need to run sed in Windows, you can download UnxUtils, then extract sed.exe into c:\Windows\System32

Then when you pipe with sed like you suggested, it works. (Windows 8.1)

Thanks.

wmic NIC where NetEnabled=true get Name, Speed | sed -e s/000000000/Gbit/ | sed -e s/000000\b/Mbit/