title: New-PSSession does not work locally
body: <p>I am trying to connect to the localhost using <code>New-PSSession</code>.</p>
  
  <p>I have </p>
  
  <ul>
  <li><p>Configured WinRM using</p>
  
  <pre><code>winrm quickconfig
  </code></pre></li>
  <li><p>Enabled PS Remoting</p>
  
  <pre><code>Enable-PSRemoting
  </code></pre></li>
  <li><p>Added Trusted Host</p>
  
  <pre><code>Set-Item WSMan:\localhost\Client\TrustedHosts * -Force
  </code></pre></li>
  <li><p>There is an inbound rule on 8173 port on firewall.</p></li>
  </ul>
  
  <p>Output of <code>winrm</code>:</p>
  
  <pre><code>PS C:\&gt; winrm get winrm/config/listener?Address=*+Transport=HTTP
  Listener
      Address = *
      Transport = HTTP
      Port = 8173
      Hostname
      Enabled = true
      URLPrefix = wsman
      CertificateThumbprint
      Listening on = 127.0.0.1
  </code></pre>
  
  <p>I am trying to run the following command:</p>
  
  <pre><code>New-PSSession -ConnectionUri http://localhost:8173/WSMAN
  </code></pre>
  
  <p>but I get this error: </p>
  
  <pre><code>[localhost] Processing data from remote server failed with the following error message:
  Error with error code 14 occurred while calling method WSManPluginReceiveResult. For
  more information, see the about_Remote_Troubleshooting Help topic.
      + CategoryInfo          : OpenError: (System.Manageme....RemoteRunspace:RemoteRunspace) [], PSRemotingTransportException
      + FullyQualifiedErrorId : PSSessionOpenFailed
  </code></pre>
  
  <p>EDIT: </p>
  
  <p>The only extra thing that I see is that the network is connected to public
      $listenerport = "8173"
      winrmwinrm create winrm/config/Listener?Address=*+Transport=HTTP "<code>@</code>{Port<code>=</code>"$listenerport<code>"</code>}"</p>
  
  <pre><code>C:\&gt;winrm get winrm/config
  Config
      MaxEnvelopeSizekb = 1039440
      MaxTimeoutms = 60000
      MaxBatchItems = 32000
      MaxProviderRequests = 4294967295
      Client
          NetworkDelayms = 5000
          URLPrefix = wsman
          AllowUnencrypted = true
          Auth
              Basic = true
              Digest = true
              Kerberos = true
              Negotiate = true
              Certificate = true
              CredSSP = false
          DefaultPorts
              HTTP = 8173
              HTTPS = 5986
          TrustedHosts = *
      Service
          RootSDDL = O:NSG:BAD:P(A;;GA;;;BA)(A;;GA;;;S-1-5-21-2458768215-3945602940-3262220185-1045)S:P(AU;FA;GA;;;WD)(AU;SA;GWGX;;;WD)
          MaxConcurrentOperations = 4294967295
          MaxConcurrentOperationsPerUser = 500
          EnumerationTimeoutms = 60000
          MaxConnections = 25
          MaxPacketRetrievalTimeSeconds = 120
          AllowUnencrypted = true
          Auth
              Basic = true
              Kerberos = false
              Negotiate = true
              Certificate = true
              CredSSP = false
              CbtHardeningLevel = Relaxed
          DefaultPorts
              HTTP = 5985
              HTTPS = 5986
          IPv4Filter = *
          IPv6Filter = *
          EnableCompatibilityHttpListener = false
          EnableCompatibilityHttpsListener = false
          CertificateThumbprint
      Winrs
          AllowRemoteShellAccess = true
          IdleTimeout = 180000
          MaxConcurrentUsers = 5
          MaxShellRunTime = 2147483647
          MaxProcessesPerShell = 15
          MaxMemoryPerShellMB = 150
          MaxShellsPerUser = 5
  
  
  PS C:\&gt; Get-PSSessionConfiguration microsoft.powershell | fl *
  
  
  xmlns            : http://schemas.microsoft.com/wbem/wsman/1/config/PluginConfiguration
  Name             : Microsoft.PowerShell
  Filename         : %windir%\system32\pwrshplugin.dll
  SDKVersion       : 1
  XmlRenderingType : text
  lang             : en-US
  PSVersion        : 2.0
  ResourceUri      : http://schemas.microsoft.com/powershell/Microsoft.PowerShell
  SupportsOptions  : true
  ExactMatch       : true
  Capability       : {Shell}
  Permission       :
  
  Administrators group have permission as I see in the window popup (Set-PSSessionConfiguration -Name Microsoft.PowerShell -showSecurityDescriptorUI)
  </code></pre>
  
  <p>EDIT 2: <img src="https://i.stack.imgur.com/u8K3I.jpg" alt="Permissions"></p>