Get Network Card Bandwidth Info using PowerShell

There are a lot of tools around to monitor your network and NICs, but I found a single line of PowerShell code can list your network cards (local and remote as well) and their bandwidths:

Get-WmiObject -class Win32_PerfFormattedData_Tcpip_NetworkInterface |
    Select Name, CurrentBandWidth |
    Format-Table
        @{Expression={$_.Name}; Label="NIC" },
        @{Expression={$_.CurrentBandWidth/ 1000000 }; Label="MBit/s"}

2 Responses to Get Network Card Bandwidth Info using PowerShell

  1. PSLover says:

    Here is the output:

    Get-WmiObject : Invalid query
    At line:1 char:14
    + Get-WmiObject <<<< -class Win32_PerfFormattedData_Tcpip_NetworkInterface |
    + CategoryInfo : InvalidOperation: (:) [Get-WmiObject], ManagementException
    + FullyQualifiedErrorId : GetWMIManagementException,Microsoft.PowerShell.Commands.GetWmiObjectCommand

  2. Thanks for your post.

    I would rather calcultate properties during the ‘Select-Object’… One solution :

    Get-WmiObject -class Win32_PerfFormattedData_Tcpip_NetworkInterface |
    Select @{Name=”NIC”; Expression={$ .Name} },@{Name=”MBit/s”; Expression={[Math]::Round($ .CurrentBandWidth/ 1MB) }} |
    Format-Table

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: