# Running command in windows using ad hoc command

**URL:** <https://forum.ansible.com/t/running-command-in-windows-using-ad-hoc-command/2271>\
**Category:** Get Help\
**Tags:** windows, collections, awx\
**Created:** [November 9, 2023, 2:24pm UTC](https://forum.ansible.com/t/running-command-in-windows-using-ad-hoc-command/2271 "2023-11-09T14:24:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![lekoOwO](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/lekoowo/32/1481_2.png) [@lekoOwO](https://forum.ansible.com/u/lekoOwO)\
**Post date:** [November 9, 2023, 2:24pm UTC](https://forum.ansible.com/t/running-command-in-windows-using-ad-hoc-command/2271/1 "2023-11-09T14:24:03Z")

</div>

In AWX’s ad\_hoc\_command, I can run commands in posix machines using `shell` or `command` module.  
But both `win_shell` and `win_command` are not available in AWX’s ad\_hoc\_command.  
How do I run a command in windows target using ad hoc command?

---

<div class="post-metadata">

**Author:** ![lekoOwO](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/lekoowo/32/1481_2.png) [@lekoOwO](https://forum.ansible.com/u/lekoOwO)\
**Post date:** [November 9, 2023, 3:04pm UTC](https://forum.ansible.com/t/running-command-in-windows-using-ad-hoc-command/2271/2 "2023-11-09T15:04:27Z")

</div>

Never mind, I’ve found that there’s a whitelist in Settings → Jobs

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [December 9, 2023, 3:04pm UTC](https://forum.ansible.com/t/running-command-in-windows-using-ad-hoc-command/2271/3 "2023-12-09T15:04:40Z")

</div>

Closed on December 9, 2023, 3:04pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
