<h2>Connecting to remote windows server xx.xx.xx.xx failed</h2><br/><div style="overflow-x:auto"><article><div ><h3 >Issue </h3><section><ul><li>Connecting to remote windows server xx.xx.xx.xx failed during discovery.</li><li>Even-though the credentials supplied are working on the target device.</li></ul></section></div><div ><h3 >Release</h3><section><ul><li>All</li></ul></section></div><div ><h3 >Cause</h3><section><ul><li>MID Server is not able to Invoke a power-shell session on to the target.</li><li>Test the below command from Power-Shell console on MID Server Host Machine.<br /><br /><span style="background-color: #999999;">New-PSSession –ComputerName <Target Host> –credential <UserName used for Discovery><br /><br /></span><img style="border: 1.0px solid black; vspace: 0.5px; hspace: 0.5px; align: baseline;" title="" src="sys_attachment.do?sys_id=6d5d10e8475035103b05ff48436d4349" alt="" width="668" height="279" align="baseline" border="1.0" hspace="0.5" vspace="0.5" /><br /><br /></li><li>Provide the working credentials for the Target device, it fails to invoke the session -<br /><br /> <pre>New-PSSession : [xx] Connecting to remote server xx failed with the following error message :<br /><br />The WinRM client cannot process the request. Default authentication may be used with an IP address under the following<br /><br />conditions: the transport is HTTPS or the destination is in the TrustedHosts list, and explicit credentials are<br /><br />provided. Use winrm.cmd to configure TrustedHosts. Note that computers in the TrustedHosts list might not be<br /><br />authenticated. For more information on how to set TrustedHosts run the following command: winrm help config. For more<br /><br />information, see the about_Remote_Troubleshooting Help topic.<br /><br />At line:1 char:1<br /><br />+ New-PSSession –ComputerName xx –credential xx ...<br /><br />+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</pre> <img style="border: 1.0px solid black; vspace: 0.5px; hspace: 0.5px; align: baseline;" title="" src="sys_attachment.do?sys_id=995d10e8475035103b05ff48436d432d" alt="" width="687" height="177" align="baseline" border="1.0" hspace="0.5" vspace="0.5" /></li></ul></section></div><div ><h3 >Resolution</h3><section><ul><li>Adding the target device to trusted hosts on the MID Server Host should resolve this issue.</li><li>To add the specific target to trusted hosts, use below command -<br /><br /><span style="background-color: #999999;">set-item wsman:\localhost\Client\TrustedHosts -value <Target Host><br /><br /></span></li><li>Similarly to add specific domain to trusted hosts, use below command -<br /><br /><span style="background-color: #999999;">set-item wsman:\localhost\Client\TrustedHosts *.<domain>.com</span></li></ul></section></div></article></div>