# SID to username?

**URL:** <https://forum.ansible.com/t/sid-to-username/27346>\
**Category:** Ansible Project\
**Created:** [April 23, 2018, 5:15am UTC](https://forum.ansible.com/t/sid-to-username/27346 "2018-04-23T05:15:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bob](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/bob/32/9260_2.png) [@bob](https://forum.ansible.com/u/bob)\
**Post date:** [April 23, 2018, 5:15am UTC](https://forum.ansible.com/t/sid-to-username/27346/1 "2018-04-23T05:15:50Z")

</div>

Is there a way to get the username from the SID with ansible?

---

<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:** [April 23, 2018, 5:35am UTC](https://forum.ansible.com/t/sid-to-username/27346/2 "2018-04-23T05:35:33Z")

</div>

Ansible has the full power of PowerShell available at hand, just find out how to do it there and then use win\_shell to execute the task. A quick Google search brings up a few pages on how this can be done in PowerShell, the one I find easiest to use is [https://www.morgantechspace.com/2015/09/convert-sid-to-username-using-powershell.html](https://www.morgantechspace.com/2015/09/convert-sid-to-username-using-powershell.html).

Thanks

Jordan

---

<div class="post-metadata">

**Author:** ![bob](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/bob/32/9260_2.png) [@bob](https://forum.ansible.com/u/bob)\
**Post date:** [April 23, 2018, 5:42am UTC](https://forum.ansible.com/t/sid-to-username/27346/3 "2018-04-23T05:42:45Z")

</div>

I should have been more specific in my question. Meant native to ansible. I’ll jump to powershell.
