We help IT Professionals succeed at work.

Get-Counter : Internal performance counter API call failed. Error: c0000bc4.

bibi92
bibi92 used Ask the Experts™
on
Hello,

How can I obtain remote counter perfmon :
PS SQLSERVER:\> $collectCounters=(Get-Counter  -ComputerName MAS -Counter "MSOLAP$MAS:Lock requests/sec"  | ForEach-Object { $_.CounterSam
ples});
Get-Counter : Internal performance counter API call failed. Error: c0000bc4.
At line:1 char:30
+ $collectCounters=(Get-Counter <<<<   -ComputerName MAS-Counter "MSOLAP$MAS:Lock requests/sec"  | ForEach-Object { $_.CounterSamples});
    + CategoryInfo          : InvalidResult: (:) [Get-Counter], Exception
    + FullyQualifiedErrorId : CounterApiError,Microsoft.PowerShell.Commands.GetCounterCommand

How can I resolve this problem?

Thanks

bibi
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Actually i've seen this error previously when the server I was running against did not have the counter I was trying to pull. For example some of our DC's run Server 2008 and some Server 2003 and the 2008 ones could pull counters the 2003 ones could not.

Check the identity of the counter you are pulling by adding it to perfmon and checking the full path to the counter name is valid.