Some time we require a SID for the user account in active directory, using the simple inbuilt windows command we can get the User to SID
You can use the below command to find the User to SID
User to SID (Username to SID)
Username: Johnson (Pre-Win2k Name)
Syntax:
dsquery user -name “username” | dsget user -sid
Example:
dsquery user -name johnson | dsget user -sid
sid
S-1-5-21-0220945662-3111232555-725789543-38967718
dsget succeeded
Related Articles
How do I show the username of a SID
etc the inverted function?
HI,
do you require SID to user name tool? then please check the below Link, it’s a free tool from http://www.joeware.net
http://www.windowstricks.in/2010/01/sid-to-name.html