Minimal permission required to run a Get-WmiObject command

Hello,

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}}
Vivian_ShiAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

footechCommented:
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.
https://gist.github.com/exchange12rocks/950aa29f66e6369d2c02fa8583bb3a75
Go to the URL referenced at the beginning of the code for more description on how it works.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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!
0
footechCommented:
The Win32_Process class is in the "root/cimv2" namespace.
1
footechCommented:
Information given on needed permissions, and how to change them if desired.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Powershell

From novice to tech pro — start learning today.