Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Network Usage of Process Using Powershell

I want to calculate the bytes sent and recieved by a particular process .I want to use powershell for that. Something which I can do using Resource Monitor->Network Activity. How can i do that using get-counter?

like image 897
Shree Avatar asked Apr 01 '13 18:04

Shree


People also ask

How do I find my network utilization?

Access your router by entering your router's IP address into a web browser. Once you sign in, look for a Status section on the router (you might even have a Bandwidth or Network Monitor section depending on the type of router). From there, you should be able to see the IP addresses of devices connected to your network.

Is PowerShell used for networking?

Windows PowerShell is an essential admin tool designed specifically for Windows administration. By learning to use Windows PowerShell, network administrators quickly gain access to information from Windows Management Instrumentation, Active Directory and other essential sources of information.

How do I run a process in PowerShell?

The Get-Process cmdlet gets the processes on a local or remote computer. Without parameters, this cmdlet gets all of the processes on the local computer. You can also specify a particular process by process name or process ID (PID) or pass a process object through the pipeline to this cmdlet.


1 Answers

There is a really good Scripting Guy article on using the Get-Counter cmdlet here:

Scripting Guy - Get-Counter

The trick will be finding the counter that you need, and I don't think you can get the granularity you're after as these are the same counters that PerfMon uses. It's more focused around the whole Network Interface than it is around the individual processes using the interface. With that said, if it's the only thing using the given interface it should do the trick nicely.

Have a look at the Network Interface options available for a start:

(get-counter -list "Network Interface").paths
like image 56
Owen B Avatar answered Sep 20 '22 17:09

Owen B