title: PowerShell: Start service and dependent services
body: <p>I was looking up how to start a service and it's dependent services, and I was reading <a href="http://4sysops.com/archives/managing-services-the-powershell-way-part-3/" rel="nofollow">this site</a>.</p>
  
  <p>It has an example:</p>
  
  <pre><code>get-service lanmanserver | Foreach { start-service $_.name -passthru; start-service $_.DependentServices -passthru}
  </code></pre>
  
  <p>However, when I run the above cmdlet, I get the error:</p>
  
  <pre><code>Start-Service : Cannot find any service with service name 'System.ServiceProcess.ServiceController'.
  </code></pre>
  
  <p>Does anybody know why I'm getting this error?
  Also, I've been using a different way to start a service and it's dependencies:</p>
  
  <pre><code>get-service lanmanserver | select -expand DependentServices | start-service
  </code></pre>
  
  <p>Any feedback on the workaround?</p>
  
  <p>Thanks!</p>