How to use the “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. https://techdirectarchive.com/2020/02/06/windows-command-prompt-cmd-command-shell-and-powershell-capabilities/

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.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s