Skip to content

Instantly share code, notes, and snippets.

@macostag
Created April 11, 2021 02:18
Show Gist options
  • Save macostag/46d990c85757f672a6e52d503f47501a to your computer and use it in GitHub Desktop.
Save macostag/46d990c85757f672a6e52d503f47501a to your computer and use it in GitHub Desktop.
Convert SID to User/Group Name and User to SID
wmic useraccount where name='test_user' get sid
wmic useraccount where (name='test_user' and domain=′corp.com′) get sid
wmic useraccount where sid='S-1-3-12-12451234567-1234567890-1234567-1434' get name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment