WHOAMI
: Getting Information About the Current User
The WHOAMI
command gives you information about the user who is currently logged on to the computer:
WHOAMI [/UPN | /FQDN | LOGONID] [/USER | /GROUPS | /CLAIMS | /PRIV] [/ALL] [/FO Format]
You probably won’t use this command often on the Windows 8 computer because you’ll almost always be logged on as administrator. However, WHOAMI
is useful when you’re working on a client computer and you’re not sure who is currently logged on.
For example, the following command redirects the current user’s SID, username, groups, and privileges to a file named whoami.txt
using the list format:
whoami /all /fo ...
Get Windows 8 In Depth now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.