small ps script

I am trying to ask to do a small PS argument that will open a CMD.exe then run a file within the CMD.exe c:\program files\testapp\testappdiagnostic.exe /p

all within the CMD shell because the diagnostic brings up a result matrix which i need. all of this does not need any elevation it can run within user creds context

Any help is appreciated

 

Didn’t get you here, are you trying to create a script ?

yes need help in doing so …

Take a look at Start-Process. You do not need to use CMD, just execute the EXE:

https://stackoverflow.com/questions/651223/powershell-start-process-and-cmdline-switches

Also, you may want to try a shot in the dark too and search ‘Powershell testappdiagnostic.exe’. The best solution would be there is an alternative Powershell solution, if not someone may have already posted something to run the exe and\or parse the output.