title: Run custom npm command in Powershell on VSTS hosted build agent
body: <p>I need to iteratively run an npm command and want to do it from a PowerShell task in a VSTS build step. I cannot use <code>"npm &lt;command&gt;"</code> in PowerShell and have also tried to run commands using <code>"C:\Program Files\nodejs\npm.cmd" "&lt;command&gt;"</code> and <code>Invoke-Expression "C:\Program Files\nodejs\npm.cmd" "&lt;command&gt;"</code> in the PowerShell on the VSTS hosted build agent. How can I run npm commands from a PowerShell build step? </p>
  
  <p>Additionally, the <code>&lt;command&gt;</code> is a custom script from my package.json file. It does not need to be custom. I only put it there to call in a custom npm VSTS build step.</p>