whoami and echo in Windows??

were you ever curious to know on which domain you are logged into currently and what is your user SID and what are all the groups you belong to and what are all the permissions you’ve etc??  Wouldn’t it be nice if we get all this info at a single place, with a single command? “WHOAMI” is the guy which can do it for you. Before moving on to WHOAMI please see below screenshot for legacy “ECHO” command. Basically I’m showing you how can we pull username and/or domain name.

WHOAMI:

Basic “whoami” will give you the same info..you can see below.

Let’s get little fancy now…by appending “/USER” switch.

in the above screenshot you can see SID as well…Okay, let’s see by appending “/FQDN” switch now.

well, how about appending “/ALL” Switch?

As you can see I’ve got very detailed information using “ALL”! Instead, I can buffer this to some text file using ‘>whoami.txt’ and open it later anytime using Notepad…

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: