# Windows module - including PS script before transfering to the remote.

**URL:** <https://forum.ansible.com/t/windows-module-including-ps-script-before-transfering-to-the-remote/23610>\
**Category:** Ansible Project\
**Tags:** windows\
**Created:** [February 1, 2017, 9:18am UTC](https://forum.ansible.com/t/windows-module-including-ps-script-before-transfering-to-the-remote/23610 "2017-02-01T09:18:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bernard\_Landon](https://avatars.discourse-cdn.com/v4/letter/b/d26b3c/32.png) [@Bernard\_Landon](https://forum.ansible.com/u/Bernard_Landon)\
**Post date:** [February 1, 2017, 9:18am UTC](https://forum.ansible.com/t/windows-module-including-ps-script-before-transfering-to-the-remote/23610/1 "2017-02-01T09:18:32Z")

</div>

Hello all!

I’m writing a number of Powershell Ansible modules and facing an issue.  
Say you have a module A and a module B and some functions defined in include.ps1.  
I would like module A and B to include include.ps1.

My understanding is Ansible will transfer only module A. Which means a regular include will fail because include.ps1 won’t be on the remote.  
Is it possible to make Ansible to include “include.ps1” in the module A **before** transfering it to the remote?

Would be super convenient. At the moment I have to copy/paste include.ps1 in module A, B and so on.  
As you can imagine this leads to a number of problems 🙂

Thanks!

---

<div class="post-metadata">

**Author:** ![Matt\_Davis](https://avatars.discourse-cdn.com/v4/letter/m/ce7236/32.png) [@Matt\_Davis](https://forum.ansible.com/u/Matt_Davis)\
**Post date:** [February 6, 2017, 9:47pm UTC](https://forum.ansible.com/t/windows-module-including-ps-script-before-transfering-to-the-remote/23610/2 "2017-02-06T21:47:12Z")

</div>

There’s some stuff coming in 2.3 that will help address this- the Windows exec wrapper is getting completely overhauled, and one of the new things it can do is include arbitrary PS module files from the controller along with the Ansible module code (instead of just module\_utils/powershell.ps1 like today). The \*nix module subsystem is getting support for pluggable module\_utils (eg, add new module\_utils files outside the core Ansible install), and if I have time, I’ll add the same support to the Windows exec wrapper (if not, definitely for 2.4). Stay tuned for the new 2.3 exec wrapper- this should be landing in devel next week unless I run into any major blockers.

-Matt
