Learn about Windows PowerShell
Summary: Use an easy command in Windows PowerShell to get userdomain\username.
How can I use a command in Windows PowerShell to get information about a current user in userdomain\username format?
Use the WhoAmI command:
Don't you think there should be a command; "Who-Who-WhoAreYou"?
@JRV LOL ... I like that, whoami ... whoareyou
@Ed - I can hear them now.
bull###t, it doesn't return anything in Sep. 2013!
that won't work in powershell.
@AAA I am not certain what you are doing wrong, but WhoAmi still works. I just verified it on my laptop. I opened PowerShell, typed WhoAmI and here are the results:
PS C:\> whoami
see above comment to aaa
I think it's work in powershell 3 or better
Whomi is a utility command that is included with Vista and later and can be installed on earlier systems.
It does not require PowerShell. It is located at: c:\windows\system32\whoami.exe.
Whoami is not a PowerShell command.
WHOAMI /ALL is very useful