WHOAMI.exe (Windows 7/2008 or XP Resource kit)

Display user, group and privileges for the current user.

Syntax
      whoami [/upn | /fqdn | /logonid]

      whoami {[/user] [/groups] [/priv]} [/fo Format] [/nh]

      whoami /all [/fo Format] [/nh]

Key

   /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.

   /priv     Display the security privileges of the current user.

   /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.

   /nh	      Don't display the column header in the output.
             This is valid only for table and CSV formats.

   /?	      Help

Examples

Display the domain and user name of the current user:
whoami

Display all of the information in the current access token:
whoami /all

“We can now manipulate images to such an extrodinary extent that there's no lie you cannot tell” ~ Sir David Attenborough

Related:

SET
- Display, set, or remove Windows environment variables
VER - Display version information
VOL - Display a disk label
Whereami.cmd - Display user information
Environment variables: %USERDOMAIN% and %USERNAME%
Powershell: PS> whoami /groups /fo csv | convertfrom-csv
Equivalent bash command (Linux): whoami - Print the current user id and name (`id -un')


© Copyright SS64.com 1999-2014
Some rights reserved