title: Powershell remoting - Policy does not allow the delegation of user credentials
body: <p>I'm new to powershell and I'm having troubles using credentials delegation. I have the following script:</p>
  
  <pre><code>$session = New-PSSession myserver -Authentication CredSSP -Credential DOMAIN\Administrator
  Invoke-Command -Session $session -ScriptBlock { &lt;Some PowerShell Command&gt; }
  </code></pre>
  
  <p>Before running it, I did the following:</p>
  
  <ol>
  <li>Run <code>Enable-PSRemoting</code> on myserver. </li>
  <li>Run <code>Enable-WSManCredSSP Server</code> on myserver. </li>
  <li>Run <code>Restart-Service WinRM</code> on myserver. </li>
  <li>Run <code>Enable-WSManCredSSP Client –DelegateComputer myserver</code> on the client. </li>
  <li>Rebooted both the server and the client.</li>
  </ol>
  
  <p>But once I run the script, I get the following error message:</p>
  
  <pre><code>[myserver] Connecting to remote server failed with the following error message : The WinRM client cannot process the request. A computer policy does not allow the delegation of
   the user credentials to the target computer. Use gpedit.msc and look at the following policy: Computer Configuration -&gt; Administrative Templates -&gt; System -&gt; Credentials Delega
  tion -&gt; Allow Delegating Fresh Credentials.  Verify that it is enabled and configured with an SPN appropriate for the target computer. For example, for a target computer name "m
  yserver.domain.com", the SPN can be one of the following: WSMAN/myserver.domain.com or WSMAN/*.domain.com. For more information, see the about_Remote_Troubleshooting Help topic.
      + CategoryInfo          : OpenError: (System.Manageme....RemoteRunspace:RemoteRunspace) [], PSRemotingTransportException
      + FullyQualifiedErrorId : PSSessionOpenFailed
  </code></pre>
  
  <p>I checked the policies as mentioned in the error message but everything seems to be fine. What else could be blocking me?</p>