Windows

How to use the utility “Whoami” in windows

This is a built-in console of Windows command and it displays user, group, and privileges information for the user who is currently logged on to the local system. If used without parameters, whoami displays the current domain and user name, group, and privileges of the current user. take a look at this link before for more information on Windows Command Prompt.

Here are the steps to display the user and group information for a specific user.
Search for “Run”
– Type cmd.exe as shown below.
– Press Enter

Using the tool “whoami” without any further parameter will prompt only the username as shown below.

With the parameter /all
– This will displays all information in the current access token, including the current user name, security identifiers (SID), privileges, and groups that the current user belongs to.

/upn: Display the user name in user principal name (UPN) format.
/fqdn: Display the user name in fully qualified domain name (FQDN) format.
/logonid: Display the logon ID of the current user.
/user: Display the current domain and user name and the security identifier (SID).
/groups: Display the user groups to which the current user belongs. This includes
- The Integrity Control level: Mandatory Label\Low
- Mandatory Level = Low. Mandatory Label\Medium
- Mandatory
Level = Medium/Standard. Mandatory Label\High 
- Mandatory Level = Elevated.
/fo: The output format. Valid values: 
- table Table format (default)
- list List format.
- csv Comma-separated value (CSV) format.
/all: Display all information in the current access token, including the current user name, security identifiers (SID), privileges,and groups that the current user belongs to
/?: Help
/nh: Specifies that the column header should not be displayed in the output. This is valid only for table and CSV formats.
/priv: Display the security privileges of the current user.

I hope you found this blog post helpful. If you have any questions, please let me know in the comment session.

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x