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"}
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
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