title: Checks about WinRM service in remote machine
body: <p>I have seen great article<br>
  PowerShell 2.0 remoting guide: Part 8 – remoting scenarios and troubleshooting<br>
  <a href="http://www.ravichaganti.com/blog/?p=1181" rel="noreferrer">http://www.ravichaganti.com/blog/?p=1181</a></p>
  
  <p>I have this issue: I have two computers in domain, in network.</p>
  
  <p>First Test OK: Remoting to a computer in domain from a computer in domain</p>
  
  <p><strong>COMPANY_DOMAIN\desmonitor is Domain User.<br>
  Domain COMPANY_DOMAIN<br>
  Computer: iis01</strong></p>
  
  <blockquote>
    <p>PS C:\Users\myUser> Enter-PSSession -Computername iisw01 -Credential COMPANY_DOMAIN\desmonitor<br>
    [desiisw01]: PS C:\Users\desmonitor\Documents> exit</p>
  </blockquote>
  
  <p>Second Test Wrong: : Remoting to a computer in domain from a computer in domain, using local administrator user</p>
  
  <p><strong>iis01\instalador is Local User for machine iis01<br>
  Computer: iis01</strong></p>
  
  <blockquote>
    <p>PS C:\Users\myUser> Enter-PSSession -Computername iis01
    -Credential iis01\instalador Enter-PSSession : Connecting to remote server failed with the following error message : The WinRM
    client cannot process the request.</p>
  </blockquote>
  
  <p>In machine ii01 using Terminal Server (Remote Desktop) using COMPANY_DOMAIN\desmonitor, I open PS Console and I execute</p>
  
  <blockquote>
    <p>PS C:\Users\desmonitor> winrm quickconfig<br>
    WinRM already is set up to receive requests on this machine.<br>
    WinRM already is set up for remote management on this machine.<br>
    PS C:\Users\desmonitor></p>
  </blockquote>
  
  <p>Then, I try again but I get same error:</p>
  
  <blockquote>
    <p>PS C:\Users\myUser> Enter-PSSession -Computername iis01
    -Credential iis01\instalador   Enter-PSSession : Connecting to remote server failed with the following error message : The WinRM
    client cannot processthe request.</p>
  </blockquote>
  
  <p>Using this command:</p>
  
  <blockquote>
    <p>PS C:\Users\myUser> Set-Item WSMan:\localhost\Client\TrustedHosts -Value "*" -Force 
    PS C:\Users\myUser></p>
  </blockquote>
  
  <p>Now, I get access:</p>
  
  <blockquote>
    <p>PS C:\Users\myUser> Enter-PSSession -Computername iis01 -Credential iis01\instalador 
    [iiw01]: PS C:\Users\instalador\Documents> $Host</p>
  </blockquote>
  
  <pre><code>Name             : ServerRemoteHost
  Version          : 1.0.0.0
  InstanceId       : 6905896f-e6c7-4603-82f0-20183f71b1ec
  UI               : System.Management.Automation.Internal.Host.InternalHostUserInterface
  CurrentCulture   : es-ES
  CurrentUICulture : es-ES
  PrivateData      :
  IsRunspacePushed :
  Runspace         :
  </code></pre>
  
  <p>In my company, there are many computers to connect to iis01. </p>
  
  <p>Each compute need execute the command for adding the remote computer to local computer’s trusted hosts list ??  </p>
  
  <p>I have several questions about it ¿</p>
  
  <p>How can I get list about TrustedHosts (WSMan:\LocalHost\Client ) in local computer ?<br>
  How can I know if WinRM service is enabled in a computer ?<br>
  How can I know if WinRM service is running in a computer ?<br>
  How can I know if WinRM  is set up to receive request  in a computer ?<br>
  How can I know if WinRM  is set up  for remote management on this machine?.  </p>