Whoami
Updated: January 21, 2005
Syntax
whoami [{/user | /groups | /priv}] [/foFormat]
whoami/all [/foFormat]
Parameters
Remarks
- Whoami displays the complete contents of the access token (for example, the current user's security context) in the command window. It displays the user name and security identifier (SID), the group names, types, attributes and their SIDs, the privileges and their status (for example, enabled or disabled), and the logon ID.
Examples
whoami
Whoami returns the domain of the user followed by the user name. Output similar to the following appears in the Command Prompt window:
DOMAIN1\administrator
To display all of the information in the current access token, type:
whoami /all
Formatting legend
Format | Meaning |
Italic | Information that the user must supply |
Bold | Elements that the user must type exactly as shown |
Ellipsis (...) | Parameter that can be repeated several times in a command line |
Between brackets ([]) | Optional items |
Between braces ({}); choices separated by pipe (|). Example: {even|odd} | Set of choices from which the user must choose only one |
Courier font | Code or program output |