# Ansible on Windows Environment

**URL:** <https://forum.ansible.com/t/ansible-on-windows-environment/31520>\
**Category:** Ansible Project\
**Tags:** windows\
**Created:** [October 23, 2019, 5:21am UTC](https://forum.ansible.com/t/ansible-on-windows-environment/31520 "2019-10-23T05:21:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Harini\_K](https://avatars.discourse-cdn.com/v4/letter/h/73ab20/32.png) [@Harini\_K](https://forum.ansible.com/u/Harini_K)\
**Post date:** [October 23, 2019, 5:21am UTC](https://forum.ansible.com/t/ansible-on-windows-environment/31520/1 "2019-10-23T05:21:13Z")

</div>

Hi,

We followed below steps to use Ansible on Windows.

1. Installing Ansible on Cygwin
2. Using Host machine as Windows machine
3. Using Powershell to perform actions.

The issues which we are facing are :

1. On launching any application it launches as background task (service).
2. PSExec when used also will be triggered as service.

The Tasks which were successful using powershell is running in background when we use win\_shell. The same happens for win\_cmd as well.

Kindly Suggest

---

<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:** [October 23, 2019, 7:11am UTC](https://forum.ansible.com/t/ansible-on-windows-environment/31520/2 "2019-10-23T07:11:13Z")

</div>

Hi

It is not clear what you are trying to do.

By default ansible connects to Windows as batch login type, not interactive user, so usually there is no graphical user interface available to ansible. You can get an interactive user login by using the Become feature of ansible, but ansible is not really intended to drive graphical user interfaces. It can be used for various things but I think it is best for installing software and enforcing configuration across many machines.

Ansible might still be useful to you but it's not clear to me what you are trying to achieve.

Hope this helps,

Jon

---

<div class="post-metadata">

**Author:** ![Harini\_K](https://avatars.discourse-cdn.com/v4/letter/h/73ab20/32.png) [@Harini\_K](https://forum.ansible.com/u/Harini_K)\
**Post date:** [October 23, 2019, 10:39am UTC](https://forum.ansible.com/t/ansible-on-windows-environment/31520/3 "2019-10-23T10:39:06Z")

</div>

Thanks Jon for the Response!

Let me explain it in a detailed way.

we would be performing the below Tasks using Ansible and since this is WIndows Environment, we are using the Powershell Scripts.

1. Create VM ( Working as Expected)
2. Launch the Application (Here, the application is launched as Background service)
3. Take a screen shot to confirm that the Application is Launched.
