Error DataBase-One Place all Solutions Forums Blog Glossary    Contact Us
Search  
   
Browse by Category
Error DataBase-One Place all Solutions .: Operating Systems .: Windows Operating Systems .: Windows XP .: How to Displays the username and domain for the currently logged in user using WHOAMI tool in XP

How to Displays the username and domain for the currently logged in user using WHOAMI tool in XP

Displays the username and domain for the currently logged in user.

The whoami output is the same as the 2 environment variables %USERDOMAIN% and %USERNAME%.

So the same output can usually be achieved with

ECHO %USERDOMAIN%\%USERNAME%

One exception to this is when using RUNAS /env , e.g. if my username is Simon:

c:>RunAs /env /user:JDoe cmd.exe
c:>ECHO %USERDOMAIN%\%USERNAME%
ss64\Simon

c:>whoami
ss64\JDoe

Under Windows 2000 there is an additional switch WHOAMI /all - this shows all permissions and group memberships.


How helpful was this article to you?

Related Articles

article How to Move a user account into a domain or edit an NT username using MOVEUSER.exe command (Resourse Kit)
MOVEUSER.exe (Resource Kit) Move a user...

(No rating)  3-9-2008    Views: 146   
article How to use Microsoft Exchange User Monitor Tool
There’re several reasons why you would want...

(No rating)  4-11-2008    Views: 160   
article How to join client to domain using NETDOM Tool
NETDOM.exe (NT Resource Kit supplement 2,...

(No rating)  3-7-2008    Views: 154   

User Comments

Add Comment
No comments have been posted.