Current windows user command
Is there a command on windows that allows to display the current user logged on?
July 28th, 2010 12:17am

It is possible to do it on CMD with the use of the command whoami. It will display to you the current user logged on. Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Best regards.
Free Windows Admin Tool Kit Click here and download it now
July 28th, 2010 12:21am

Just a remark, it is that you can have two kinds of diplays: 1- If you are using a domain account, you will have the following display: NetBIOS-Domain-Name\User-account-name (example: MICROSOFT\Ahmed) 2-If you are using a local account, you will have the following display: PC-Name\User-account-name (example: PC-de-Ahmed\Ahmed) Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Best regards.
July 28th, 2010 12:33am

You mean the user is asking for his own login? In this case whoami or echo %username% in cmd prompt. Or you want to know the user logged on i.e. on a remote system? Try the command wmic /node:computername ComputerSystem GET UserName (replace computername with the name of the system you want to query) The firewall on the target system must be configured to allow WMI requests and maybe you need to have administrator permissions on the remote system. Best greetings from Germany Olaf
Free Windows Admin Tool Kit Click here and download it now
July 28th, 2010 12:51am

Thank you. These are the commands I need :)
July 28th, 2010 1:02am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics