Jeremy is correct whoami is one of the best ways to verify your login information. It has several flags that get the information in different ways.
- WhoAmI has three ways of working:
- Syntax 1:
- WHOAMI [/UPN | /FQDN | /LOGONID]
- Syntax 2:
- WHOAMI { [/USER] [/GROUPS] [/PRIV] } [/FO format] [/NH]
- Syntax 3:
- WHOAMI /ALL [/FO format] [/NH]
- Description:
- This utility can be used to get user name and group information
- along with the respective security identifiers (SID), privileges,
- logon identifier (logon ID) for the current user (access token)
- on the local system. i.e. who is the current logged on user?
- If no switch is specified, tool displays the user name in NTLM
- format (domainusername).
- Parameter List:
- /UPN Displays the user name in User Principal
- Name (UPN) format.
- /FQDN Displays the user name in Fully Qualified
- Distinguished Name (FQDN) format.
- /USER Displays information on the current user
- along with the security identifier (SID).
- /GROUPS Displays group membership for current user,
- type of account, security identifiers (SID)
- and attributes.
- /PRIV Displays security privileges of the current
- user.
- /LOGONID Displays the logon ID of the current user.
- /ALL Displays the current user name, groups
- belonged to along with the security
- identifiers (SID) and privileges for the
- current user access token.
- /FO format Specifies the output format to be displayed.
- Valid values are TABLE, LIST, CSV.
- Column headings are not displayed with CSV
- format. Default format is TABLE.
- /NH Specifies that the column header should not
- be displayed in the output. This is
- valid only for TABLE and CSV formats.
- /? Displays this help message.
- Examples:
- WHOAMI
- WHOAMI /UPN
- WHOAMI /FQDN
- WHOAMI /LOGONID
- WHOAMI /USER
- WHOAMI /USER /FO LIST
- WHOAMI /USER /FO CSV
- WHOAMI /GROUPS
- WHOAMI /GROUPS /FO CSV /NH
- WHOAMI /PRIV
- WHOAMI /PRIV /FO TABLE
- WHOAMI /USER /GROUPS
- WHOAMI /USER /GROUPS /PRIV
- WHOAMI /ALL
- WHOAMI /ALL /FO LIST
- WHOAMI /ALL /FO CSV /NH
- WHOAMI /?