If you need to determine who is logged into a Windows system, there are several alternatives for collecting that information from a command line interface. One of method is to use a Visual Basic script to determine who is logged on, such as the WhoLogon.vbs script by Guy Thomas. Or you can use the free PsLoggedOn utility by Mark Russinovich at Sysinternals. There is also a whoami utility within the Native Win32 ports of some GNU utilities, which contains ports of some common GNU utilities to native Win32.
[ More Info ]