# setting up  “physical path credentials to IIS WebApp using win\_iis\_webapplication”  in Ansible

**URL:** <https://forum.ansible.com/t/setting-up-physical-path-credentials-to-iis-webapp-using-win-iis-webapplication-in-ansible/30205>\
**Category:** Ansible Developer\
**Created:** [April 27, 2019, 5:38pm UTC](https://forum.ansible.com/t/setting-up-physical-path-credentials-to-iis-webapp-using-win-iis-webapplication-in-ansible/30205 "2019-04-27T17:38:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Venu\_Gopal](https://avatars.discourse-cdn.com/v4/letter/v/a183cd/32.png) [@Venu\_Gopal](https://forum.ansible.com/u/Venu_Gopal)\
**Post date:** [April 27, 2019, 5:38pm UTC](https://forum.ansible.com/t/setting-up-physical-path-credentials-to-iis-webapp-using-win-iis-webapplication-in-ansible/30205/1 "2019-04-27T17:38:14Z")

</div>

I am trying to create the Webapplication using Ansible with the win\_iis\_webapplication command. I am unable to set the “physical path credentials” for the site using this command. Could someone help me on how to pass the credentials with the command( **win\_iis\_webapplication** ).

[https://docs.ansible.com/ansible/latest/modules/win\_iis\_webapplication\_module.html](https://docs.ansible.com/ansible/latest/modules/win_iis_webapplication_module.html)

This documentation didn’t provide anything on the “Physical Path Credentials” attribute of the web application.

---

<div class="post-metadata">

**Author:** ![Tchia04](https://avatars.discourse-cdn.com/v4/letter/t/fbc32d/32.png) [@Tchia04](https://forum.ansible.com/u/Tchia04)\
**Post date:** [April 28, 2019, 7:49pm UTC](https://forum.ansible.com/t/setting-up-physical-path-credentials-to-iis-webapp-using-win-iis-webapplication-in-ansible/30205/2 "2019-04-28T19:49:44Z")

</div>

You probably have to write your own ansible module / role to do it if you don’t see it

---

<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:** [May 2, 2019, 1:14pm UTC](https://forum.ansible.com/t/setting-up-physical-path-credentials-to-iis-webapp-using-win-iis-webapplication-in-ansible/30205/3 "2019-05-02T13:14:44Z")

</div>

Not something I use myself but you might be able to use dsc resources for this - see [https://github.com/PowerShell/xWebAdministration](https://github.com/PowerShell/xWebAdministration)

At a push you can probably use ‘appcmd’ although it is fiddly to get the syntax right.

Hope this helps,

Jon
