Power shell Get-Counter : No application is associated with the specified file for this operation

860 Views Asked by At

I am new to power shell scripting. I am trying performance monitor commands for local machine in windows power shell with run as administrator.

PS C:\windows\system32> Get-Counter "\\$env:COMPUTERNAME\Processor(_total)\% Processor Time" -SampleInterval 5 -MaxSamples 5

But I am getting below error

Program 'Get-Counter' failed to run: No application is associated with the specified file for this operationAt line:1 char:1

Am unable to understand what is that error and why it is showing. I tried same command in another laptop, i am able to get response.

0

There are 0 best solutions below