# Ansible module for windows

**URL:** <https://forum.ansible.com/t/ansible-module-for-windows/18063>\
**Category:** Ansible Project\
**Tags:** windows, rhel\
**Created:** [April 23, 2015, 6:41pm UTC](https://forum.ansible.com/t/ansible-module-for-windows/18063 "2015-04-23T18:41:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Leonid\_Lee](https://avatars.discourse-cdn.com/v4/letter/l/e480ec/32.png) [@Leonid\_Lee](https://forum.ansible.com/u/Leonid_Lee)\
**Post date:** [April 23, 2015, 6:41pm UTC](https://forum.ansible.com/t/ansible-module-for-windows/18063/1 "2015-04-23T18:41:58Z")

</div>

Hello.

Is there any way to create modules using python to deploy packages on windows?

I created simple module that prints “Hello world!” to text file. It works on ansible control machine (rhel):

`

$ ansible localhost -i hosts.yml -m test  
127.0.0.1 | success \>\> {  
“changed”: true,  
“msg”: “./test.txt”  
}

`

But fails on windows remote machine:

`

$ ansible ansible-slave -i hosts.yml -m test  
192.168.163.137 | FAILED \>\> {

“failed”: true,  
“msg”: “The argument ‘C:\Users\ansible\AppData\Local\Temp\ansible-tmp-1429814185.92-235487101584232\\test.ps1’ to the -File parameter does not exist. Provide the path to an existing ‘.ps1’ file as an argument to the -File parameter.\r\n”,  
“parsed”: false  
}

`

---

<div class="post-metadata">

**Author:** ![Yassen\_Damyanov](https://avatars.discourse-cdn.com/v4/letter/y/9fc29f/32.png) [@Yassen\_Damyanov](https://forum.ansible.com/u/Yassen_Damyanov)\
**Post date:** [April 23, 2015, 8:06pm UTC](https://forum.ansible.com/t/ansible-module-for-windows/18063/2 "2015-04-23T20:06:05Z")

</div>

Quoting from the manual ([http://docs.ansible.com/intro\_windows.html](http://docs.ansible.com/intro_windows.html)):  
“For Windows, ansible modules are implemented in PowerShell.”

AFAIK, this is the official and supported way to do things on Windows.

Cheers,  
Y.
