Home
> Commands N-Z
> Commands W
WHOAMI
Description
| Syntax
| Parameters
| Switches
| Related
| Notes
| Examples
| Errorlevels
| Availability
Displays the CURRENT username and domain.
Displays the complete contents of the access token in the
command window. Displays the user name and security identifier
(SID), the group names, types, attributes and their SIDs, the
Syntax
WHOAMI
/?
WHOAMI
[/FQDN
| /LOGONID
| /UPN]
WHOAMI
[/GROUPS
| /PRIV
| /USER]
[/FO format]
WHOAMI
[/ALL]
[/FO format]
Parameters
none
Switches
- /?
(NT2003)
- Display command help.
- /ALL
(NT2000)
- Shows all permissions and group memberships.
- (NT2003)
- Displays the active user name and groups, and the
security identifiers (SID) and privileges in the
current access token.
- /FO format
(NT2003)
- Specifies the output format:
- csv Displays output in comma-delimited (.csv)
- list Displays output in a list
- table Displays output in a table (default)
- /FQDN
(NT2003)
- Displays the user name in fully qualified domain
name (FQDN) format.
- /GROUPS
(NT2003)
- Displays group names.
- /LOGONID
(NT2003)
- Displays logon ID.
- /PRIV
(NT2003)
- Displays privileges.
- /UPN
(NT2003)
- Displays the user name in user principal name
(UPN) format.
- /USER
(NT2003)
- Displays the current user name.
Related
SET - Display, set, or remove Windows NT environment variables.
VER - Display version information.
VOL - Display a disk label.
Equivalent Linux BASH commands:
id - Print user and group id's.
who - Print who is currently logged in.
whoami - Print the current user id and name (`id -un').
Notes
The whoami output is the same as the 2 environment variables
%USERDOMAIN% and
%USERNAME%.
The same output can be achieved with:
ECHO %USERDOMAIN%\%USERNAME%
Examples
none.
Errorlevels
none.
Availability
- External Resource Kit
-
- DOS
-
none
- Windows
-
none
- Windows NT
-
NT4
NT2000
NT2003
Last Updated: 2003/07/28
Direct corrections or suggestions to:
Rick Lively