How to use the Whoami command

"Who am I;" is a philosophical question for late night discussions. Whoami, on the other hand, is an extremely useful Windows command.

When you run the whoami command in a Windows command prompt box with no additional commands, you will see the minimum details: the current domain and username, in the form \ domain \ username (if you are logged in to a local account or a Microsoft account , the domain will display your computer name).

Run the Whoami command along with the /? and you will see help showing the options for displaying and additional information about the account of the currently logged-in user.

For the better , use the whoami /all command, and it will display the ID (SID) for the current user, along with information about group membership and privileges.

The / fo list switch changes the default panel display (which can be difficult to read) to a neat list.

Use the / fo csv switch to change the appearance of the results to comma-separated values, which you can enter into a spreadsheet.

WHOAMI Parameter list:

/ UPN : displays the user name in User Principal Name (UPN) .
/ FQDN : displays the user name in Fully Qualified Distinguished Name (FQDN) format.
/ USER : displays information about the logged in user along with the security identifier (SID).
/ GROUPS : displays the group membership for the logged in user, account type, security identifiers (SID) and properties.
/ PRIV : displays the security privileges for the logged in user.
/ LOGONID : displays the logon ID for the logged in user.
/ ALL: Displays user name for the logged in user, groups, security identifiers (SID) and privileges.
/ FO format : output format in TABLE, LIST, CSV values.
/ NH : says in column not appear in the output. It only works for TABLE and CSV formats.
/? : help.

iGuRu.gr The Best Technology Site in Greecefgns

every publication, directly to your inbox

Join the 2.087 registrants.

Written by giorgos

George still wonders what he's doing here ...

Leave a reply

Your email address is not published. Required fields are mentioned with *

Your message will not be published if:
1. Contains insulting, defamatory, racist, offensive or inappropriate comments.
2. Causes harm to minors.
3. It interferes with the privacy and individual and social rights of other users.
4. Advertises products or services or websites.
5. Contains personal information (address, phone, etc.).