Who is Logged on Remote Command

wmic /node: “%1” computersystem get username

Where %1 is the computer name.