The whoami command-line tool

Most of you one day or another might have come across an end user permission issue and wanted to quickly verify the users’ permissions in the domain. Let’s say you are at an end user workstation and have limited or no access to remote admin tools. Then I suggest to go for the command-line tool whoami, a quick and easy tool that displays user, group, and privileges information for the user who is currently logged on to the local computer. This security command-line tool can be used on Windows Server 2008, Windows Vista and Windows 7.

If used without parameters, whoami displays the current domain and user name while the /all option would reveal information about the current access token, including the current user name, security identifiers (SID), privileges, and groups that the current user belongs to.

A typical example is when users report that they have no access to a specific shared resource in the domain. The following example lists the groups the logged on user is member of in a list format:

whoami /groups /fo list

In order to get just the info you need and remove the extra bits you can pipe the output to the find command as shown below:

whoami /groups /fo list | find “Group Name”

whoami.jpg

About The Author

Leave a Comment

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Scroll to Top