# Testing for new psexec module

**URL:** <https://forum.ansible.com/t/testing-for-new-psexec-module/26960>\
**Category:** Ansible Project\
**Tags:** windows\
**Created:** [March 12, 2018, 3:09am UTC](https://forum.ansible.com/t/testing-for-new-psexec-module/26960 "2018-03-12T03:09:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jborean](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/jborean/32/1525_2.png) [@jborean](https://forum.ansible.com/u/jborean)\
**Post date:** [March 12, 2018, 3:09am UTC](https://forum.ansible.com/t/testing-for-new-psexec-module/26960/1 "2018-03-12T03:09:14Z")

</div>

Hi All

I’ve been working on an Ansible module that allows you to run a command on a Windows host remotely without the need for WinRM and in the end I’ve created a module called psexec to do this. If any Windows admins (or others who wish to try it out) are interested you can find the PR here [https://github.com/ansible/ansible/pull/36723](https://github.com/ansible/ansible/pull/36723) and try it out. Some of the things you can do with this module are;

- Run an adhoc command on a remote Windows host without WinRM being setup and enabled
- Use it to do bootstrapping tasks that would be otherwise hard to run in some environments, e.g. setting up the WinRM listeners or upgrading PowerShell to the 3.0 requirement
- Runs on Python/linux so no requirement for another Windows host like win\_psexec and is easily runnable on the Ansible controller
- Fine control over the process and how it is executed, e.g. become like options to run as a different user or the System account

It is no substitution for the winrm connection plugin as it does not use a proper protocol but rather takes advantage of some internal Windows mechanisms to run a process.

Some more links if you are interested in trying it out or just want to know more are [https://github.com/jborean93/pypsexec](https://github.com/jborean93/pypsexec) and [https://www.bloggingforlogging.com/2018/03/12/introducing-psexec-for-python/](https://www.bloggingforlogging.com/2018/03/12/introducing-psexec-for-python/).

Any feedback is most welcome.

Thanks

Jordan
