I have noticed that when I run the following command
Pushd \\RemoteMachine\C$ && java.exe -version
I get the java version of the computer I am on. However when I run the pushd command with a search option like the command below I get the actual information found on that computer.
Pushd \\RemoteMachine\C$ && dir /s java.exe
Why is this the case? Is it possible to run java.exe -version on a remote PC and have it output that computers information on my screen?