0

I could get performance counters on my server as administrator:

PS C:\Users\Administrator\Documents> Get-Counter '\memory\available bytes'

Timestamp                 CounterSamples                                                                                      
---------                 --------------                                                                                      
28.04.2014 5:19:55        \\vm108838-2\memory\available bytes :                                                               
                          393011200

But when I try to get performance counter from non-admin user, I get following error:

PS C:\Users\lpu3\Documents> Get-Counter '\memory\available bytes'
Get-Counter : Unable to connect to the specified computer or the computer is offline.
    + CategoryInfo          : InvalidResult: (:) [Get-Counter], Exception
    + FullyQualifiedErrorId : CounterApiError,Microsoft.PowerShell.Commands.GetCounterCommand

Documentation states:

Performance counters are often protected by access control lists (ACLs). To get all available performance counters, open Windows PowerShell with the "Run as administrator" option.

So, the question is, where I could change that ACL to include my user?

Bunyk
  • 7,635
  • 8
  • 47
  • 79

1 Answers1

1

Do not change the ACL. Add the user account to a group that has permissions to use the Performance monitor logs. As per the documentation:

Members of the Performance Monitor Users group 
• Can use all the features that are available to the Users group.
• Can view real-time performance data in Performance Monitor, and can change the Performance Monitor display properties while viewing real-time data. 
• Cannot create or modify Data Collector Sets.


Members of the Performance Log Users group
• Can use all the features that are available to the Performance Monitor Users group.
• Can create and modify Data Collector Sets after the group is assigned the Log on as a batch user user right, as described in Enable Logging for Performance Log Users Group Members.
• Cannot use the Windows Kernel Trace provider in Data Collector Sets.
vonPryz
  • 22,996
  • 7
  • 54
  • 65