unable to ping windows machine

i got the below error when i am trying to ping windows machine
i have ran that configurepowershell.ps1 power script also and my winrm service is running successfully nut still facing same issue, please give me a solution for this.

win2016 | UNREACHABLE! => {
    "changed": false,
    "msg": "basic: HTTPConnectionPool(host='win2016', port=5985): Max retries exceeded with url: /wsman (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x7f8b2e02ed90>, 'Connection to 52.168.175.51 timed out. (connect timeout=30)'))",
    "unreachable": true

I used the below details for connection in inventory:
[windows]
win2016

[windows:vars]
ansible_user=root
ansible_password=password
ansible_connection=winrm
ansible_port=5985
ansible_winrm_transport=basic
ansible_ssh_port=5986
ansible_winrm_server_cert_validation=ignore

      Can you ping it from the command line?

yes, I did it from command line . i used this command
ansible all -i hosts -m win_ping.

got the above error.

yes, I did it from command line . i used this command
ansible all -i hosts -m win_ping.

got the above error.

      I meant running the ping command, no ansible involved, from the
command line, as in

ping win2016.box.somewhere.out.there

If you can't ping using, well, ping don't blame ansible.

Hi

Insted of root please mention administrator
And it’s password

windows:vars]
ansible_user=adminstrator

And check

I have one major doubt
Ansible_user:
Ansible_password:

What does these two commands represent?.

Do they represent windows credentials or the user credentials from which you want to ping windows machine.

Yes these are endpoint credential for user

Sorry for asking again end point credentials means windows…

Sorry for asking again end point credentials means windows..

      He meant whatever WIndows user you want ansible to use to login
to this win2016 box.

Hii all,

well

thanks for your help. resolved!!

As previously someone communicated, before try to ping windows vm from ansible needs to check whether it is pinging from other windows or linux machine by using ping ip command.