Tell me more ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

1 Answer

up vote 3 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.

share|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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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