LKBEN11675: How to find the SID for the user from the Windows command line?
Symptom
You need to find the SID (= security identifier) of a certain user.
Cause
-
Solution
To find the SID you open a command line as administrator and type the following:
wmic useraccount get name,sid
This will show you something like:
Name SID
Administrator S-1-5-21-4118348484-4021748030-481564265-500
DefaultAccount S-1-5-21-4118348484-4021748030-481564265-503
Gast S-1-5-21-4118348484-4021748030-481564265-501
Oops S-1-5-21-4118348484-4021748030-481564265-1001
WDAGUtilityAccount S-1-5-21-4118348484-4021748030-481564265-504
To find the SID for one user only, you can use:
wmic useraccount where name="Wimmi" get sid
SID
S-1-5-21-4118348484-4021748030-481564265-1001
Have fun.
Disclaimer:
The information provided in this document is intended for your information only. Lubby makes no claims to the validity of this information. Use of this information is at own risk!About the Author
Author:
- Keskon GmbH & Co. KGWim Peeters is electronics engineer with an additional master in IT and over 30 years of experience, including time spent in support, development, consulting, training and database administration. Wim has worked with SQL Server since version 6.5. He has developed in C/C++, Java and C# on Windows and Linux. He writes knowledge base articles to solve IT problems and publishes them on the Lubby Knowledge Platform.
Latest update: 07-09-2023