There's no such thing as UAT/"run as admin" when using WinRM (which Ansible 
does). What does your script do, exactly?

On Monday, May 22, 2017 at 4:19:12 PM UTC+2, Ashish Vijay wrote:
>
> Hello All,
>
> I want to execute one powershell script on few target servers which 
> require powershell to be run as administrator. I am getting access denied 
> error when i try with normal playbook.
>
> - name: Install software on Wndows Remote server.
>   hosts: all
>   tasks:
>
>   - name: copy script
>     win_copy:
>       src: /tmp/install.ps1
>       dest: c:\temp\install.ps1
>
>   - name: run a powershell script
>     script: install.ps1 -Install -arg '{{ ARGLIST }}'
>     register: out1
>   - debug: var=out1
>
>
> I am getting access denied error when i try to execute this playbook.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/14ff980d-d082-446f-ad9e-5f7b62e7199c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to