سؤال

First time poster here.

I am trying to get the current bandwidth usage for Windows Server 2008R2 via command line. I've tried netstat -e but this gives me very different numbers than the actual bytes that have been transferred.

The stats I'd like to see are the same stats that are shown when you click on "Local Area Connection" (or whatever your active internet connection is listed as) within the "Networking and Sharing Center" gui in Control Panel. Within the gui window that comes up there is the lower "Activity" section. The sent Sent and Received information is what I am trying to get via msdos or powershell.

Thanks to anyone who can lend a hand.

هل كانت مفيدة؟

المحلول

Have you try to use get-Counter.

Here is the line that gives my network card bandwith usage :

get-counter "\\jpbhpp2\interface réseau(intel[r] 82567lm gigabit network connection)\total des octets/s"

But be careful you CAN'T use it like that because counters names are specific to the language of your system.

So you have to adapt it to your computer try :

get-counter

then

get-counter Get-counter -ListSet *
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top