Powershell to start and stop services and should prompt for input
-
Monday, November 26, 2012 7:15 PM
Hi
I require powershell script which takes the input of user account and service name and later then allows that user to start and stop the service.Any help is much appreciated.Many thanks.
Umeed4u
All Replies
-
Monday, November 26, 2012 8:11 PMModerator
Hi,
Please read the following:
Bill
- Marked As Answer by Bill_StewartMicrosoft Community Contributor, Moderator Monday, December 31, 2012 5:19 PM
-
Monday, November 26, 2012 9:58 PM
Hi
I require powershell script which takes the input of user account and service name and later then allows that user to start and stop the service.Any help is much appreciated.Many thanks.
Umeed4u
Normally this is done with the GUI by altering the permsiions on teh service object. You can also do it globally using Group Policy.
TO do it directly you would need to use "SubInAcl" as it can alter the permisisons on servidce objects.
SUBINACL /?
follow the examples.
subinacl /service "Browser" /grant=MyDomain\SOmeuserid=TO
TO is start and stop service.
¯\_(ツ)_/¯
- Edited by jrvMicrosoft Community Contributor Monday, November 26, 2012 10:20 PM

