User Service Command/Scrip Help

Hello,

I need help making a command that retrieve the dependent services of a given service and allow the user
to stop or start them. I need to allow our users to enter a name of a service and an action of ‘start’ or
‘stop’. I’m targeting a single service name so the parameter has to be mandatory.

If anyone has a script or could help steer me in the right direction, that would be appreciated.

Thanks

These might help

https://devblogs.microsoft.com/scripting/powertip-use-powershell-to-find-dependent-services/

https://devblogs.microsoft.com/scripting/use-windows-powershell-to-display-service-dependencies/

https://www.nextofwindows.com/windows-quick-tip-how-to-find-dependent-services

http://powershell-guru.com/powershell-tip-71-list-the-dependent-services/