# Ansible module win\_uri

**URL:** <https://forum.ansible.com/t/ansible-module-win-uri/32628>\
**Category:** Ansible Project\
**Tags:** windows\
**Created:** [April 7, 2020, 10:08pm UTC](https://forum.ansible.com/t/ansible-module-win-uri/32628 "2020-04-07T22:08:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jeremy\_Hobbs](https://avatars.discourse-cdn.com/v4/letter/j/dc4da7/32.png) [@Jeremy\_Hobbs](https://forum.ansible.com/u/Jeremy_Hobbs)\
**Post date:** [April 7, 2020, 10:08pm UTC](https://forum.ansible.com/t/ansible-module-win-uri/32628/1 "2020-04-07T22:08:59Z")

</div>

I currently have a playbook that use the uri module to connect to an API and get a json request. This was working properly. I am now attempting to implement NTLM or Kerberos authentication on the web server. I attempted to change it to the win\_uri module and add the username and password to the parameters. When I run it, I get an error for powershell.

fatal: [localhost]: FAILED! =\> {“changed”: false, “module\_stderr”: “/bin/sh: powershell: command not found\n”, “module\_stdout”: “”, “msg”: “MODULE FAILURE\nSee stdout/stderr for the exact error”, “rc”: 127}

After searching some, the only thing I found, was someone saying that you have to delegate the task to a windows machine and setup a listener on the windows machine.

Has anyone used the win\_uri module? Is that correct. that you have you delegate the task to a windows machine. That seems like a lot of unnecessary work.There is plenty of python modules that will pass windows authentication.

Has anyone found a better solution or got any ideas?

thanks  
Jeremy

---

<div class="post-metadata">

**Author:** ![sivel](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/sivel/32/1198_2.png) [@sivel](https://forum.ansible.com/u/sivel)\
**Post date:** [April 7, 2020, 11:09pm UTC](https://forum.ansible.com/t/ansible-module-win-uri/32628/2 "2020-04-07T23:09:36Z")

</div>

The win\_uri module is written in PowerShell and designed to be run on a Windows target.

---

<div class="post-metadata">

**Author:** ![Jeremy\_Hobbs](https://avatars.discourse-cdn.com/v4/letter/j/dc4da7/32.png) [@Jeremy\_Hobbs](https://forum.ansible.com/u/Jeremy_Hobbs)\
**Post date:** [April 8, 2020, 12:27am UTC](https://forum.ansible.com/t/ansible-module-win-uri/32628/3 "2020-04-08T00:27:36Z")

</div>

is there another module that would work for a basic json request that includes options for authentication?

thanks  
Jeremy
