Ansible on Windows w/o administrator privileges possible?

275 views
Skip to first unread message

alv...@googlemail.com

unread,
Sep 7, 2016, 4:33:54 PM9/7/16
to Ansible Project
Hello,

Is it possible to use a non-administrator user to run Ansible against Windows hosts and if yes, how?

I've used ``invoke-command -computername localhost -credential ansible -scriptblock {$env:computername}`` to test inside Powershell, which works fine only if the Ansible user is Administrator.

What did not help it:

* Add user to Windows Remote management group
* Add user to Windows Remote management and WinRMRemoteWMIUsers__ group

Test target is this SRV2012R2 vagrant box: https://atlas.hashicorp.com/mwrock/boxes/Windows2012R2

Regards
Avaro Aleman

Matt Davis

unread,
Sep 8, 2016, 11:47:45 AM9/8/16
to Ansible Project
Yes, it's absolutely possible. Usually the limiting factor on a default install is the WinRM listener ACL- you can see/alter this via:

winrm configSDDL default

and add the necessary users/groups (or add the existing Windows Remote Management group).

Matt Davis

unread,
Sep 8, 2016, 11:49:34 AM9/8/16
to Ansible Project
(typical cases only need the "read" and "execute" permission)

alv...@googlemail.com

unread,
Sep 9, 2016, 9:21:37 AM9/9/16
to Ansible Project
That did the trick, thanks!
Reply all
Reply to author
Forward
0 new messages