# Error ansible over powershell

**URL:** <https://forum.ansible.com/t/error-ansible-over-powershell/21077>\
**Category:** Ansible Project\
**Created:** [April 6, 2016, 3:11pm UTC](https://forum.ansible.com/t/error-ansible-over-powershell/21077 "2016-04-06T15:11:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rodrigo\_Rapozo](https://avatars.discourse-cdn.com/v4/letter/r/e8c25b/32.png) [@Rodrigo\_Rapozo](https://forum.ansible.com/u/Rodrigo_Rapozo)\
**Post date:** [April 6, 2016, 3:11pm UTC](https://forum.ansible.com/t/error-ansible-over-powershell/21077/1 "2016-04-06T15:11:05Z")

</div>

Hello everyone!

I’m trying to use ansible over powershell but when I use this command:

“ansible chs -m win\_ping”

Looks like that it’s using ssh because the error is:

x.x.x.x | UNREACHABLE! =\> {  
“changed”: false,  
“msg”: “SSH encountered an unknown error during the connection. We recommend you re-run the command using -vvvv, which will enable SSH debugging output to help diagnose the issue”,  
“unreachable”: true  
}

P.S. My host file (/root/ansible/hosts):  
[chs]  
x.x.x.x

Someone have any idea?

---

<div class="post-metadata">

**Author:** ![j.r.hawkesworth](https://avatars.discourse-cdn.com/v4/letter/j/a3d4f5/32.png) [@j.r.hawkesworth](https://forum.ansible.com/u/j.r.hawkesworth)\
**Post date:** [April 6, 2016, 7:38pm UTC](https://forum.ansible.com/t/error-ansible-over-powershell/21077/2 "2016-04-06T19:38:36Z")

</div>

Hi,

Do you have  
ansible\_connection: winrm  
set against your host or better still in the group vars that apply to your windows hosts. See [http://docs.ansible.com/ansible/intro\_windows.html#inventory](http://docs.ansible.com/ansible/intro_windows.html#inventory)

Ansible needs telling to use winrm, otherwise it will default to attempting ssh connection, which is not available on windows.

Jon
