Need win_shell to run with elevated privileges

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

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.

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