title: Cannot invoke ServiceFabric commands from Jenkins
body: <p>I have setup a Jenkins job to deploy our application to Jenkins. The build step runs a windows batch file on the slave machine which in turn invokes a powershell script to deploy our application to an on premise service fabric cluster. However, the job fails because it doesn't recognize Service Fabric commands. All other command work though.</p>
  <p>Here is the content of the batch file that is invoked from Jenkins.</p>
  <p><code>powershell -command &quot;DeployRevCart.ps1 ; exit $LASTEXITCODE&quot;</code></p>
  <p>Below is the exception from slave machine</p>
  <pre><code>Running Connect-ServiceFabricCluster
  The term 'Connect-ServiceFabricCluster' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
  
  </code></pre>
  <p>Even this simplified batch command fails with same error.</p>
  <p><code>powershell -command &quot;Connect-ServiceFabricCluster&quot;</code></p>
  <p>However, if I run the script directly in the slave machine, everything works fine. So I appreciate any help in resolving the issue.</p>