I know there is this sc.exe where you can add and set Windows service dependencies, but I was wondering if the same thing can be done using Powershell.

link|improve this question
feedback

1 Answer

up vote 2 down vote accepted

From the documentation: not through the Set-Service cmdlet.

However the Change method of Win32_Service allows dependencies to be specified: so WMI can do it.

link|improve this answer
Ok. I've never scripted through WMI before. But if powershell can't do it, then I guess I'm left with either sc.exe or WMI. – Skaue Jun 22 '11 at 8:30
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.