Minimal permission required to run a Get-WmiObject command


I would like to set a job to run below script by a service ID, to extract users information from remote servers, may I ask if someone knows the minimal permission required?
We don't want to grant the service ID admin permission on all the servers.

Thanks so much in advance for your help!

Get-WmiObject win32_process -computer RemoteServerName | where{$_.Processid -eq 'remote_process_id'} | Select-Object processid,name,@{n='Owner';e={$_.GetOwner().User}}
Who is Participating?
footechConnect With a Mentor Commented:
The user either has to be an admin (because admins already have the necessary permission on the WMI namespace) on the machine being queried, or you have to modify the WMI namespace security to add the account you want to use, specify which permissions you want to give the account.
Here's a script someone put together to help with modifying the WMI namespace security.
Go to the URL referenced at the beginning of the code for more description on how it works.
Vivian_ShiAuthor Commented:
Thanks for your advise! May I ask which namespaces I need to grant permission to the users?  For the particular script.
Thanks a lot!
The Win32_Process class is in the "root/cimv2" namespace.
Information given on needed permissions, and how to change them if desired.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.