# ansible\_connection for Windows apart from winrm

**URL:** <https://forum.ansible.com/t/ansible-connection-for-windows-apart-from-winrm/27335>\
**Category:** Ansible Project\
**Tags:** windows\
**Created:** [April 20, 2018, 10:44am UTC](https://forum.ansible.com/t/ansible-connection-for-windows-apart-from-winrm/27335 "2018-04-20T10:44:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![utkarsh\_srivastava](https://avatars.discourse-cdn.com/v4/letter/u/e47774/32.png) [@utkarsh\_srivastava](https://forum.ansible.com/u/utkarsh_srivastava)\
**Post date:** [April 20, 2018, 10:44am UTC](https://forum.ansible.com/t/ansible-connection-for-windows-apart-from-winrm/27335/1 "2018-04-20T10:44:12Z")

</div>

Hi,

I want to run a very long process on windows machine through ansible. I want to trigger this process in background.  
But **wirnrm** does not allow me to do this. it got stuck till that process not completed.  
**I could not use win\_nssm module** , because i don’t want to create service. and also **i could not use win\_scheduled\_task** because i want to know process ID instantly.

Can anyone suggest what else i use instead of winrm module, or any other solution with winrm module.

Thanks for your help

---

<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:** [April 20, 2018, 11:43am UTC](https://forum.ansible.com/t/ansible-connection-for-windows-apart-from-winrm/27335/2 "2018-04-20T11:43:43Z")

</div>

What you want to do is possible but in reality you really don’t want to do it. This is the entire point of services and/or scheduled tasks which have arguably better error control and process handling than a detached process that you have to do with WinRM. If you are still interested you can start an async task with poll 0 and a really long async timeout value or spawn the detached process manually with WMI and Win32\_Process but as I said you probably don’t want to do this in the long run.

Thanks

Jordan
