Discovering who you are in
relation to other elements of the system is important. A username is
only part of your identity. For example, the system also knows about an
SID and your group affiliations. The WhoAmI utility provides information
about the current user based on input criteria. Using this utility
alone displays just the username. This utility uses the following
syntax:
WHOAMI [/UPN | /FQDN | /LOGONID]
WHOAMI { [/USER] [/GROUPS] [/PRIV] } [/FO {TABLE | LIST | CSV}] [/NH]
WHOAMI /ALL [/FO {TABLE | LIST | CSV}] [/NH]
The following list
describes each of the command line arguments.
/UPN
Displays the user's
name in User Principal Name (UPN) format. Use this option in a domain
setting.
/FQDN
Displays the
user's name in Fully Qualified Distinguished Name (FQDN) format. Use
this option in a domain setting.
/USER
Displays the username and SID.
/GROUPS
Displays the
user's group affiliations. Each group entry includes the group name,
type (such as well-known group or alias), group SID, and group
attributes (such as mandatory group, enabled by default, and enabled
group).
/PRIV
Displays the user's
privileges. Each privilege entry includes the privilege name,
description, and state (enabled or disabled).
/LOGONID
Displays
the SID that represents the user's logon identification.
/ALL
Displays the
username, user's group affiliations, user's privileges, and logon
identifier.
FO {TABLE | LIST | CSV}
Defines the output
provided by the utility. The table format is normally the easiest to
view on screen. The table columns define the values for output, while
each row contains one driver entry. The CSV output provides the best
method for preparing the data for entry in a database. Use redirection to output the CSV data to a
file and then import it to your database. The list format provides one
data element per line. Each group of data elements defines one driver.
The utility separates each driver by one blank line. Some people find
the list format more readable when working in verbose mode since the
table format requires multiple lines for each entry (the lines wrap).
/NH
Forces the utility
to display the data without a column header. You can only use this
command line switch with the table and CSV formats. Omitting the header
makes it easier to incorporate the data in a report or import it into a
database.