Forrest logo
back to the whoami tool

whoami:tldr:2ebf5

whoami: Display the user principal name (UPN) of the current user.
$ whoami /upn
try on your machine

The command "whoami /upn" is used in Windows command prompt to display the User Principal Name (UPN) associated with the currently logged-in user.

User Principal Name (UPN) is a user identifier in an Active Directory (AD) environment, commonly used for authentication purposes. It consists of a username followed by the "at" symbol (@) and a domain name.

When you run the "whoami /upn" command, it retrieves and displays the UPN of the current user account. For example, if the currently logged-in user is "john@example.com," the command will return "john@example.com."

This command is particularly useful in scripting or troubleshooting scenarios where you need to verify the UPN of the logged-in user without needing to navigate through user account settings.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the whoami tool