title: PowerShell: The client cannot connect to the destination specified in the request
body: <p>My goal is to execute the PowerShell file on remote server through TFS tasks '<code>PowerShell on Target Machines</code>'
  for that Steps I have taken so far are:</p>
  <p>Both Build and remote server already enabled</p>
  <pre><code>Enable-PSRemoting -Force
  </code></pre>
  <p>also added the trusthost server IPs added</p>
  <pre><code>Set-Item wsman:\localhost\client\trustedhosts *
  </code></pre>
  <p>and</p>
  <pre><code>Restart-Service WinRM
  </code></pre>
  <p>after doing all above steps still got the following error on TFS task</p>
  <blockquote>
  <p>##[error]Connecting to remote server 'REMOTE SERVER IP' failed with
  the following error message  The client cannot connect to the
  destination specified in the request. Verify that the service on the
  destination is running and is accepting requests. Consult the logs and
  documentation for the WS-Management service running on the
  destination, most commonly IIS or WinRM. If the destination is the
  WinRM service, run the following command on the destination to analyze
  and configure the WinRM service: &quot;winrm quickconfig&quot;. For more
  information, see the about_Remote_Troubleshooting Help topic.</p>
  </blockquote>
  <p>What will be the reason or what I am missing any thing.</p>