title: Create new-service with multiple dependencies from powershell
body: <p>Background: I have a custom task for TFS 2015 Build/Release to create a new windows service using powershell</p>
  
  <pre><code>New-Service -BinaryPathName $servicePath -Name $serviceName -Credential $cred -Description $description -DependsOn $dependsOn -DisplayName $friendlyName -StartupType $startupType
  </code></pre>
  
  <p>This works perfectly fine with a single dependency using the -DependsOn argument. The problem is one of my services has two dependencies. The <a href="https://technet.microsoft.com/en-us/library/hh849830.aspx" rel="nofollow" title="MSDN">MSDN</a> documentation states to use a comma separated list of dependencies. I've tried this with no luck. The service gets created but the dependencies are missing and the service fails to start. I have verified that the task is passing the values to the powershell script as expected. I'm passing -DependsOn MSMQ,MSDTC </p>
  
  <p>I've tried passing it as a quoted string, which fails. I can pass the dependencies singularly and that works just fine. </p>
  
  <p>My question is simply, how can I pass multiple dependencies to the New-Service powershell command from a TFS Build Task?</p>