# Trying to add variable while running ad-hoc command against window server

**URL:** <https://forum.ansible.com/t/trying-to-add-variable-while-running-ad-hoc-command-against-window-server/26511>\
**Category:** AWX Project\
**Tags:** windows\
**Created:** [January 18, 2018, 11:27am UTC](https://forum.ansible.com/t/trying-to-add-variable-while-running-ad-hoc-command-against-window-server/26511 "2018-01-18T11:27:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kumar\_Guhan](https://avatars.discourse-cdn.com/v4/letter/k/ce73a5/32.png) [@Kumar\_Guhan](https://forum.ansible.com/u/Kumar_Guhan)\
**Post date:** [January 18, 2018, 11:27am UTC](https://forum.ansible.com/t/trying-to-add-variable-while-running-ad-hoc-command-against-window-server/26511/1 "2018-01-18T11:27:25Z")

</div>

I am trying to just run a win\_ping command with a windows server through the UI, while trying to specify in the “Extra Variables” text area the ansible\_user, ansible\_connection and ansible\_port variables I get the message " ansible\_user, ansible\_connection, ansible\_port are prohibited from use in ad hoc commands".

Any idea where this needs to be specified otherwise, it thinks the server is linux and tries SSH by default.

 ![](https://us1.discourse-cdn.com/ansible/original/2X/9/9add9a5eca62ca0946210894b60e60e4b919dde7.png)

Thanks,  
Kumar

> **(attachments)**
>
> ![awx1.PNG](https://us1.discourse-cdn.com/ansible/original/2X/9/9add9a5eca62ca0946210894b60e60e4b919dde7.png)

---

<div class="post-metadata">

**Author:** ![Christopher\_Meyers](https://avatars.discourse-cdn.com/v4/letter/c/3e96dc/32.png) [@Christopher\_Meyers](https://forum.ansible.com/u/Christopher_Meyers)\
**Post date:** [January 18, 2018, 12:19pm UTC](https://forum.ansible.com/t/trying-to-add-variable-while-running-ad-hoc-command-against-window-server/26511/2 "2018-01-18T12:19:59Z")

</div>

Allowing those variables to be changed presents a security problem when considering the tower security model and how the adhoc feature is used in conjunction with inventory.

You can modify those variables on the associated inventory, groups, or hosts.

> **(attachments)**
>
> ![awx1.PNG](https://us1.discourse-cdn.com/ansible/original/2X/9/9add9a5eca62ca0946210894b60e60e4b919dde7.png)

---

<div class="post-metadata">

**Author:** ![Kumar\_Guhan](https://avatars.discourse-cdn.com/v4/letter/k/ce73a5/32.png) [@Kumar\_Guhan](https://forum.ansible.com/u/Kumar_Guhan)\
**Post date:** [January 18, 2018, 12:39pm UTC](https://forum.ansible.com/t/trying-to-add-variable-while-running-ad-hoc-command-against-window-server/26511/3 "2018-01-18T12:39:12Z")

</div>

I understand the model now. Appreciate the prompt response. Thanks!
