# Windows machine not pinging.

**URL:** <https://forum.ansible.com/t/windows-machine-not-pinging/33991>\
**Category:** Ansible Project\
**Tags:** windows, ubuntu\
**Created:** [October 9, 2020, 9:20am UTC](https://forum.ansible.com/t/windows-machine-not-pinging/33991 "2020-10-09T09:20:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![uday1kiran](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/uday1kiran/32/1552_2.png) [@uday1kiran](https://forum.ansible.com/u/uday1kiran)\
**Post date:** [October 9, 2020, 9:20am UTC](https://forum.ansible.com/t/windows-machine-not-pinging/33991/1 "2020-10-09T09:20:56Z")

</div>

ICMP protocol is emabled on remote machine.  
Remote desktop is also enabled.  
winrm and enable-psremoting also enabled

Ran, below commands also.  
winrm set winrm/config/client/auth ‘@{Basic=“true”}’  
winrm set winrm/config/service/auth ‘@{Basic=“true”}’

Able to ping the remote windows serer 2019 machine from ansible server ubuntu machine.

But when I ran a ping test, win\_ping from ansible, getting below error.

adminuser@ansible-server:~/Desktop/DM$ ansible windows -m win\_ping -vvv -i inventory.yml  
ansible 2.9.12  
config file = /etc/ansible/ansible.cfg  
configured module search path = [u’/home/adminuser/.ansible/plugins/modules’, u’/usr/share/ansible/plugins/modules’]  
ansible python module location = /usr/lib/python2.7/dist-packages/ansible  
executable location = /usr/bin/ansible  
python version = 2.7.17 (default, Nov 7 2019, 10:07:09) [GCC 9.2.1 20191008]  
Using /etc/ansible/ansible.cfg as config file  
host\_list declined parsing /home/adminuser/Desktop/DM/inventory.yml as it did not pass its verify\_file() method  
script declined parsing /home/adminuser/Desktop/DM/inventory.yml as it did not pass its verify\_file() method  
Parsed /home/adminuser/Desktop/DM/inventory.yml inventory source with ini plugin  
META: ran handlers  
Using module file /usr/lib/python2.7/dist-packages/ansible/modules/windows/win\_ping.ps1  
Pipelining is enabled.  
[WARNING]: ansible\_winrm\_cert\_validation unsupported by pywinrm (is an up-to-date version of pywinrm installed?)  
\<10.1.85.246\> ESTABLISH WINRM CONNECTION FOR USER: administrator on PORT 5985 TO 10.1.85.246  
Using module file /usr/lib/python2.7/dist-packages/ansible/modules/windows/win\_ping.ps1  
Pipelining is enabled.  
[WARNING]: ansible\_winrm\_cert\_validation unsupported by pywinrm (is an up-to-date version of pywinrm installed?)  
\<10.1.85.236\> ESTABLISH WINRM CONNECTION FOR USER: administrator on PORT 5985 TO 10.1.85.236  
build-machine3 | UNREACHABLE! =\> {  
“changed”: false,  
“msg”: “ntlm: the specified credentials were rejected by the server”,  
“unreachable”: true  
}  
EXEC (via pipeline wrapper)  
build-machine2 | SUCCESS =\> {  
“changed”: false,  
“invocation”: {  
“module\_args”: {  
“data”: “pong”  
}  
},  
“ping”: “pong”  
}  
META: ran handlers  
META: ran handlers

On build-machine2 everything is open, firewall disabled.  
But on build-machine3 this problem occured but ICMP all protocols enabled and winrm also.

---

<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:** [October 9, 2020, 11:55pm UTC](https://forum.ansible.com/t/windows-machine-not-pinging/33991/2 "2020-10-09T23:55:37Z")

</div>

The ping and win\_ping modules aren’t doing an ICMP ping, they are checking to see if Ansible can connect to the host and execute a very basic module. In your case it’s able to connect to the host but it’s enable to authenticate using the credentials you have specified. See [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) for a list of reasons why it might be rejecting your credentials.

---

<div class="post-metadata">

**Author:** ![uday1kiran](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/uday1kiran/32/1552_2.png) [@uday1kiran](https://forum.ansible.com/u/uday1kiran)\
**Post date:** [October 12, 2020, 9:18am UTC](https://forum.ansible.com/t/windows-machine-not-pinging/33991/3 "2020-10-12T09:18:10Z")

</div>

But the credentials are correct.

---

<div class="post-metadata">

**Author:** ![Thanh\_Nguyen\_Duc](https://avatars.discourse-cdn.com/v4/letter/t/c89c15/32.png) [@Thanh\_Nguyen\_Duc](https://forum.ansible.com/u/Thanh_Nguyen_Duc)\
**Post date:** [October 13, 2020, 7:32am UTC](https://forum.ansible.com/t/windows-machine-not-pinging/33991/4 "2020-10-13T07:32:38Z")

</div>

You are using domain account or local account?

Vào Th 2, 12 thg 10, 2020 vào lúc 17:18 uday kiran \<[uday1kiran@gmail.com](mailto:uday1kiran@gmail.com)\> đã viết:
