title: Psexec command to run powershell script with parameters
body: <p>I am trying to run a powershell script using psexec on a remote machine in TFS2017 as the PowerShell remoting and/or WMI is disabled for security purpose using below script. But i also need to pass some parameters to my powershell script.I have defined these parameters values in the configure variable section of the environment.Not sure how to pass parameters to the powershell script in psexec. </p>
  
  <pre><code>psexec \\computername cmd /c "Powershell.exe D:\script.ps1 -arg $(arg) -arg2 $(arg2) -arg3 $(arg3)" 
  </code></pre>
  
  <p>But this does not work.Any help would be highly appreciated.</p>