Take the 2-minute tour ×
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
add comment

2 Answers

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
add comment

No it is definitely possible, see DependsOn parameter on New-Service

share|improve this answer
    
Why the down vote on this? It is correct. –  jscott Feb 27 at 13:16
add comment

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.