# winrm http port 5985

**URL:** <https://forum.ansible.com/t/winrm-http-port-5985/32943>\
**Category:** Ansible Project\
**Created:** [May 15, 2020, 6:04pm UTC](https://forum.ansible.com/t/winrm-http-port-5985/32943 "2020-05-15T18:04:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tony\_Wong](https://avatars.discourse-cdn.com/v4/letter/t/3ab097/32.png) [@Tony\_Wong](https://forum.ansible.com/u/Tony_Wong)\
**Post date:** [May 15, 2020, 6:04pm UTC](https://forum.ansible.com/t/winrm-http-port-5985/32943/1 "2020-05-15T18:04:55Z")

</div>

can winrm communicate via http 5985?

my group[\_vars file

ansible\_user: ‘administrator’  
ansible\_password: ‘xxxxxx’  
ansible\_port: 5985  
ansible\_connection: ‘winrm’  
ansible\_winrm\_server\_cert\_validation: ‘ignore’  
ansible\_winrm\_transport: ‘ntlm’

but getting it failed on one win host

10.200.1.31 | UNREACHABLE! =\> {  
“changed”: false,  
“msg”: “ntlm: the specified credentials were rejected by the server”,  
“unreachable”: true  
}  
10.50.1.231 | SUCCESS =\> {  
“changed”: false,  
“ping”: “pong”  
}

---

<div class="post-metadata">

**Author:** ![jborean](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/jborean/32/1525_2.png) [@jborean](https://forum.ansible.com/u/jborean)\
**Post date:** [May 15, 2020, 7:58pm UTC](https://forum.ansible.com/t/winrm-http-port-5985/32943/2 "2020-05-15T19:58:49Z")

</div>

You need to figure out why it’s failing, we have a page for dealing with rejected credentials [https://docs.ansible.com/ansible/latest/user\_guide/windows\_setup.html#http-401-credentials-rejected\*\*.](https://docs.ansible.com/ansible/latest/user_guide/windows_setup.html#http-401-credentials-rejected**.)\*\*

---

<div class="post-metadata">

**Author:** ![Tony\_Wong](https://avatars.discourse-cdn.com/v4/letter/t/3ab097/32.png) [@Tony\_Wong](https://forum.ansible.com/u/Tony_Wong)\
**Post date:** [May 15, 2020, 8:07pm UTC](https://forum.ansible.com/t/winrm-http-port-5985/32943/3 "2020-05-15T20:07:15Z")

</div>

it only works with https over 5986

if I change it to ntlm

ansible\_user: ‘administrator’  
ansible\_password: ‘xxxxxxx’  
ansible\_port: 5986  
ansible\_connection: ‘winrm’  
ansible\_winrm\_server\_cert\_validation: ‘ignore’  
ansible\_winrm\_transport: ‘ntlm’

then it works

its not a firewall issue either since I can telnet to port 5985 on the windows machine

---

<div class="post-metadata">

**Author:** ![jborean](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/jborean/32/1525_2.png) [@jborean](https://forum.ansible.com/u/jborean)\
**Post date:** [May 15, 2020, 9:48pm UTC](https://forum.ansible.com/t/winrm-http-port-5985/32943/4 "2020-05-15T21:48:21Z")

</div>

If only 5986 is working then it sounds like message encryption is being disabled for NTLM or is just unavailable (older libraries are installed). If you already have HTTPS working then you should just continue to use that. It provides more security benefits especially compared to NTLM over port 5985.
