none
Powershell to start and stop services and should prompt for input

    Question

  • 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

    Monday, November 26, 2012 7:15 PM

Answers

All replies

  • Monday, November 26, 2012 8:11 PM
    Moderator
  • 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 jrv Monday, November 26, 2012 10:20 PM
    Monday, November 26, 2012 9:58 PM