Learning About Your Own Account with Whoami

Windows Vista includes a new command-line utility, Whoami (Who Am I?). You can use Whoami to find out the name of the account that’s currently logged on, its SID, the names of the security groups of which it’s a member, and its privileges. To use Whoami, open a Command Prompt window. (You don’t need elevated privileges.)

Then, to learn the name of the logged-on user, type whoami. (This is particularly useful if you’re logged on as a standard user, but running an elevated Command Prompt window.) If you’re curious about your SID, type whoami /user. To see a list of your account’s group memberships, type whoami /groups /fo list. To learn which privileges are enabled for the logged-on account, type whoami ...

Get Windows Vista® Inside Out Deluxe Edition 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.