# This gives a lot of information, try piping it to a file or to your clipboard
wmic useraccount
# For just the domain, name, and sid
wmic useraccount get domain, name, sid
# Find out who is logged on
WMIC /NODE: "workstation_name" COMPUTERSYSTEM GET USERNAME
WMIC /NODE: "xp" COMPUTERSYSTEM GET USERNAME
# Get both sets of information at once!
wmic useraccount get domain, name, sid && WMIC /NODE: "xp" COMPUTERSYSTEM GET USERNAME
master