Get Username from SID or SID from Username Windows Command

Get username from SID:

wmic useraccount where sid='S-1-5-21-1207125215-1711319079-1335354557-1316' get name

Get SID from username:

wmic useraccount where name='username' get sid

Leave a Reply

Your email address will not be published. Required fields are marked *