Forum Discussion

Ajay101086's avatar
Ajay101086
Copper Contributor
Jan 11, 2022

Non-Administrative user need access on Service control manager-SCM

While running this command I am getting Access denied error. I need to run this command for a particular user without any admin privileges. Without providing admin access, is there any alternative solution to get the data through this command.

 

Invoke-Command -ComputerName "-------------" -ScriptBlock{Get-Service} -Credential "Domain\User"

 

By giving this command I am able to pull the data for the above command (Get-Services), however by running this below command every user gets access to all Services.

 

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

 

My requirement is to provide access only for a single particular ID and get all the services data. Please help me with the solution.

ThankYou.

Resources