Which permissions/rights does a user need to run "Get-WmiObject win32_service" on a remote machine?

6,751

I found out that you have to tweak the Service Control Manager security settings of Windows in order to get that command working.

I found the solution in this answer on stackoverflow.

Executing this command from the command prompt of the remote machine did the trick for me:

sc sdset SCMANAGER D:(A;;CCLCRPRC;;;AU)(A;;CCLCRPWPRC;;;SY)(A;;KA;;;BA)S:(AU;FA;KA;;;WD)(AU;OIIOFA;GA;;;WD)

People might want to read a little bit more about this topic. In this article you can find find some more informations on adjusting these settings.

Share:
6,751

Related videos on Youtube

P. Albrecht
Author by

P. Albrecht

Updated on September 18, 2022

Comments

  • P. Albrecht
    P. Albrecht almost 2 years

    I am in almost the same situation as the person who asked this question (link). The only difference is that I'm not writing a monitoring service but trying to get a WMI-based monitoring service to work.

    However after reading the linked question (and its answers) I am able to run the "Get-WmiObject win32_logicaldisk -computername WINSRV.genericdomain.local" command in a PowerShell remote-session without getting the "access denied" error as I followed the steps mentioned in the accepted answer.

    Unfortunately executing the "Get-WmiObject win32_service -computername WINSRV.genericdomain.local" command gives me the error which I mentioned above ("access denied").

    That is why I'm wondering if there are any other permissions the user needs in order to be able to successfully use the command in a PowerShell remote-session.

    So, my questions is: what permissions/rights does my user require for this?

  • P. Albrecht
    P. Albrecht over 8 years
    Thanks a lot for your answer. It helped me to get sure that I had the DCOM settings done and the WMI permissions set correctly. It turned out that you have to tweak the Service Control Manager security settings in order to get that command working. I found the command which did the trick on stackoverflow. Here is the link to the answer: stackoverflow.com/a/4432737/5337142 .
  • Art.Vandelay05
    Art.Vandelay05 over 8 years
    Gotcha. I am glad you got it solved and also I am glad to help!