I'm trying to get the currently installed Mozilla Firefox Version remotely by a PsExec Powershell Script. I found following cmd commands which will show me the information I want to get:
$pathFirefox = "`"C:\Program Files (x86)\Mozilla Firefox`""
psexec \\$i -u $username -p $password cd $pathFirefox; firefox -v | more;
So it looks like he is sending both commands. The change directory and the firefox -v | more.
Unfortunately I get the error that "The term 'firefox' is not recognized as the name of a cmdlet..."
But excactly this code is working in a native windows cmd on the target pc. I am also checking the java version like that and its working fine. Maybe because of the simple "java -version" command.
I tried masking the command like "firefox -v | more"
It should give an output like this: Mozilla Firefox 67.0.4