In Powershell I am attempting to get counters for a process (winword.exe) and then put those into a table like so:
Process Name CPU Usage(%) Memory Usage(KB) winword.exe 20% 234524324 winword.exe 15% 123343443 ....
I can get the counters using get-counter \process(winword*)… but this diplays each individual counter information as a list even when I choose format-table.
How can this be done?
Here is the script which format exactly the way you asked for:
Just save above as script and then run in Powershell and you will see the results as below:
You can modify the script to add/remove more columns and format as you like.