# Windows Modules

**URL:** <https://forum.ansible.com/t/windows-modules/20458>\
**Category:** Ansible Project\
**Tags:** windows\
**Created:** [February 4, 2016, 11:16pm UTC](https://forum.ansible.com/t/windows-modules/20458 "2016-02-04T23:16:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nikhil\_Shah](https://avatars.discourse-cdn.com/v4/letter/n/f17d59/32.png) [@Nikhil\_Shah](https://forum.ansible.com/u/Nikhil_Shah)\
**Post date:** [February 4, 2016, 11:16pm UTC](https://forum.ansible.com/t/windows-modules/20458/1 "2016-02-04T23:16:54Z")

</div>

I need to do some custom things, (e.g. git pull/pip install -r requirements) on windows. I was able to connect to the machine over kerberos. But those modules don’t seem to work on Windows. It’s weird b/c the scripts module does work and not listed under windows modules available to use. My question is, how can i achieve this goal and/or is there a “commands” equivalent for windows?

I thought it was a python path issue, so I added:

vars:

ansible\_python\_interpreter: “C:\Python34\python.exe”

After adding that, I get the following:

An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ImportError: No module named ‘grp’

fatal: [qa-codegen01.theorchard.local]: FAILED! =\> {“changed”: false, “failed”: true, “parsed”: false}

Are we limited to the amount of modules avail for windows?

---

<div class="post-metadata">

**Author:** ![Brian\_Coca](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@Brian\_Coca](https://forum.ansible.com/u/Brian_Coca)\
**Post date:** [February 4, 2016, 11:42pm UTC](https://forum.ansible.com/t/windows-modules/20458/2 "2016-02-04T23:42:42Z")

</div>

Even if you got it to execute with python, the modules are python2 not python3.

---

<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:** [February 7, 2016, 9:32am UTC](https://forum.ansible.com/t/windows-modules/20458/3 "2016-02-07T09:32:08Z")

</div>

Script, fetch and raw are the only modules which run against windows that don't start with the win\_ prefix.

The scripting language for Windows hosts is powershell, not Python.

You could probably use raw to run commands, but raw will always report changed = true so you would have to handle idempotency yourself.

Depending on what you want to achieve you might need to write a windows module or two.

Hope this helps,

Jon
