whoami

Windows CMD · Users and permissions · available in the simulator

What it does

Displays currently logged-on user information.

Syntax

whoami [/user] [/groups] [/priv] [/all] [/fo formato]

Options and parameters

  • /all

    Displays user name, groups, privileges, and SID.

    whoami /all
  • /groups

    Displays the groups to which the user belongs.

  • /priv

    Displays the user privileges.

  • /user

    Displays the user name and SID.

  • /upn

    Displays the name in UPN format.

  • /fqdn

    Displays the fully qualified distinguished name.

  • /logonid

    Displays the logon session ID.

  • /fo

    Output format: TABLE, LIST, or CSV.

Usage examples

  • whoami
  • whoami /all
  • whoami /groups
Practise whoami

Related commands