title: InvalidCredentialsError("the specified credentials were rejected by the server")
body: <p>I am unable to get WinRM session in a python script.</p>
  
  <p>Client - 2012 R2</p>
  
  <p>Client is a Domain member. user01 is a non domain account and member of Local administrators group.
  I have tried setting winrm basic or kerberos to false.
  I even tried with local administrator account but still same error.
  Both ntlm and ssl were not working.</p>
  
  <p>After setting LocalAccountTokenFilterPolicy registry to 1 this works:</p>
  
  <pre><code>p = Protocol(
      endpoint='https://X.X.X.X:5986/wsman',
      transport='ntlm',
      username='user01',
      password='admin@123',
      server_cert_validation='ignore')
  
  p.open_shell()
  </code></pre>
  
  <p>SSL is not working:</p>
  
  <pre><code>p = Protocol(
      endpoint='https://X.X.X.X:5986/wsman',
      transport='ssl',
      username='user01',
      password='admin@123',
      server_cert_validation='ignore')
  
  p.open_shell()
  </code></pre>
  
  <p>Error:</p>
  
  <blockquote>
    <p>InvalidCredentialsError("the specified credentials were rejected by the server")
    winrm.exceptions.InvalidCredentialsError: the specified credentials were rejected by the server</p>
  </blockquote>