- name: get group name from sid
win_command: powershell.exe "((New-Object System.Security.Principal.SecurityIdentifier('S-1-5-32-544')).Translate([System.Security.Principal.NTAccount]).Value -split '\\')[1]"
register: admin_group
- debug:
var: admin_group.stdout_lines[0]