as far as i know, from a remote command prompt this isnt possible. assuming you have credentials to the machines, the easiest way would be to simply remote desktop into them and check for yourself.
if you had absolutely no access to either computer, the only way i could think of would be to get the mac addresses from arp table, search the mac address table for the interface its connected to, and look at the negotiated interface speed. this is, of course, assuming you have higher end switches...
perhaps you should provide more details about why you need this information, network topology, computers, etc.