How to set Windows Services permissions from Powershell?

I need to provide a specific SERVICE_START permission account for this Windows service.

There seem to be some methods for this here , but would prefer a method that is related to PowerShell and does not require external tools, for example. using the Get / Set-ACL cmdlets or calling some .NET API.

Does anyone know how to do this? Thanks in advance.

+3
source share
2 answers

I think for this you should study subinacl.exe, which you can download here . From the download site, it is described as:

SubInACL - , , , , .

PowerShell :

SUBINACL /verbose=1 /service Spooler /grant=PC\Joe=LQSTOP

, .

+2

Source: https://habr.com/ru/post/1752361/


All Articles