# Need win\_shell to run with elevated privileges

**URL:** <https://forum.ansible.com/t/need-win-shell-to-run-with-elevated-privileges/32411>\
**Category:** Ansible Project\
**Created:** [March 6, 2020, 8:10pm UTC](https://forum.ansible.com/t/need-win-shell-to-run-with-elevated-privileges/32411 "2020-03-06T20:10:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Arielle\_Adams](https://avatars.discourse-cdn.com/v4/letter/a/8dc957/32.png) [@Arielle\_Adams](https://forum.ansible.com/u/Arielle_Adams)\
**Post date:** [March 6, 2020, 8:10pm UTC](https://forum.ansible.com/t/need-win-shell-to-run-with-elevated-privileges/32411/1 "2020-03-06T20:10:24Z")

</div>

Hi,  
I’m unable to get win\_shell to run with elevated “run as admin” privileges. I have the details posted below in this issue:

[https://github.com/ansible/ansible/issues/68086](https://github.com/ansible/ansible/issues/68086)

As stated, I tried to see if it could be a double hop issue by adding the become logic but this did not work. The script runs perfectly locally, just need to automate this using ansible.  
If anyone has any idea as to why this isn’t working properly I’d greatly appreciate it.

---

<div class="post-metadata">

**Author:** ![jborean](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/jborean/32/1525_2.png) [@jborean](https://forum.ansible.com/u/jborean)\
**Post date:** [March 6, 2020, 10:03pm UTC](https://forum.ansible.com/t/need-win-shell-to-run-with-elevated-privileges/32411/2 "2020-03-06T22:03:32Z")

</div>

As I mentioned in that issue the processes run from Ansible with the highest privileges available to the user you can verify this by running

`

- win\_command: whoami.exe /all  
`

Here is what you should roughly see back

`  
(ansible-py37) jborean:~/dev/ansible-tester$ ansible 2019 -m win\_command -a ‘whoami.exe /all’  
[WARNING]: You are running the development version of Ansible. You should only run Ansible from “devel” if you are modifying the Ansible engine, or trying out features under development. This is a rapidly  
changing source of code and can become unstable at any point.  
2019 | CHANGED | rc=0 \>\>

USER INFORMATION
