How to find user’s security identifier (SID) in Windows 10

Instructions

SID (Security Identifier) – A security identifier is a unique identifier (code) that is assigned to any domain or local accounts that are created, as well as groups and other security objects.

The operating system uses security identifiers (SIDs) to control access to various resources such as file system objects, registry keys, and network directories, which means that even if you change your username, it will not affect any preconfigurations for that account because each configuration is tied to an SID that remains constant.

The Security ID can be useful when running certain commands related to computer security.

How to find the security identifier (SID) of a user on the command prompt

To find out the SID of the current user let’s use the utility whoami, for this purpose open a command prompt and execute the following command:

whoami /user

You can also find out the SID of the current user by executing the following command:

wmic useraccount where name=”%username%” get name,sid

To find all SIDs present in the operating system, run the command:

wmic useraccount get name,sid

To finв the SID of a specific user, run the following command:

wmic useraccount where name=”TestUser1″ get sid

Where TestUser1 is the name of the user whose SID you want to know.

To find the account username by SID (reverse procedure), run the command:

wmic useraccount where sid=”S-1-5-21-3017733776-4213165835-2115491924-1002″ get name

How to find the Security Identifier (SID) of a user in Windows PowerSell

You can also find out the security ID using the Windows PowerShell console.

To find out all security identifiers (SIDs) in the Windows PowerShell console, run the cmdlet:

Get-WmiObject Win32_UserAccount | Select Name,SID

To find out the SID of a specific user, run the following command:

(gwmi win32_useraccount -Filter “name = ‘TestUser1′”).sid

Where TestUser1 is the name of the user whose SID you want to know.

You can also find out the SID of a certain user by executing the command:

Get-WmiObject -Class Win32_UserAccount -Filter “name=’TestUser1′”

Where TestUser1 is the name of the user whose SID you want to know.

To find out the user name of an account by SID (reverse procedure), run the following command:

(gwmi win32_useraccount -Filter “sid = ‘SID'”).name

Where instead of SID, specify the desired security identifier.

In this example, the command looks like this:

(gwmi win32_useraccount -Filter “sid = ‘S-1-5-21-3017733776-4213165835-2115491924-1002′”).name

How to find the Security Identifier (SID) in the Registry Editor

Using the registry editor, you can also find out the security identifier (SID), to do this, open the registry editor by pressing Win+R and in the Run window that opens, type regedit and press Enter ↵.

In the registry editor window that opens, copy/paste or navigate to the following path:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList

In the ProfileList section, you will see all users and their SIDs.

Rate article
Windows 10, Microsoft news, device reviews, registry and tweaks
Add a comment